Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Removing Text From Input

altJR
6 - Meteoroid

Good Day

 

Please can someone advise how to accomplish the following :

 

I'm trying to remove all text from beginning of line to character after the pipe … examples below :

 

"first | abc" should show as "abc"

"second | def" should show as "def"

"third | ghi" should show as "ghi"

 

The location of the pipe (|) varies on each line.

 

Note that the quotes are not included in the input … it's shown here just to highlight input and output.

 

Thanks in advance

5 REPLIES 5
PhilipMannering
16 - Nebula
16 - Nebula

You can use a Split to Columns tool to divide that field into two fields.Then use a data cleanse to get rid of the spaces.

 

Or you can use a formula tool and getword([Field],2)

 

Capture.PNG

 

 

CharlieS
17 - Castor
17 - Castor

Good call on the GetWord( function, @PhilipMannering.

 

Another option is to use the SubString( and FindString( functions (where [Field1] is your input field):

Substring([Field1],FindString([Field1]," | ")+3)

JosephSerpis
17 - Castor
17 - Castor

Hi @altJR you can use the Regex tool and replace using this syntax ^(.*[\|]) . Then use the Data Cleanse tool to remove any whitespace.

Regex_030919.PNG

altJR
6 - Meteoroid

Hi

 

All suggestions worked … solution from Charlie S was easiest to understand … Thank you all.

 

Now I'm trying to convert the result to a hyperlink so that when it's saved in Excel, it can be clicked to take you to the site. I've tried using the Report Text tool but not having much luck.

 

Any suggestions?

 

Thanks again for your assistance.

 

CharlieS
17 - Castor
17 - Castor

I'm glad you found a solution that worked for you. However, I suggest flagging all applicable solutions. The diversity of answers is my favorite part of Alteryx and the Community because it's essential to skills growth.

 

Links can be added to Rendered outputs with the Report Text tool using the Hyperlink functionality. Hyperlinks can be applied to Text or other Layout objects.

 

20190903-ReportingLink.png

Labels