Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Replace special character with string

Payal1
7 - Meteor

Hi community,

 

I am using text file as an input where few rows has Up arrows(as shown below), I want to replace that with a string 'Up Arrow'.

 

Payal1_0-1608324266442.png

 

Thanks

4 REPLIES 4
DeanWest
9 - Comet

Hello,

 

 You can use a formula tool to find that value within a field and replace/flag that row with the string "Up Arrow".

 

Try the following formula to create a new field containing the desired string:

If [Field1] = "↑"
THEN "Up Arrow"
ELSE Null()
ENDIF

 

Try the following formula to replace the "↑" with "Up Arrow" in the same field:

If [Field1] = "↑"
THEN "Up Arrow"
ELSE [Field1]
ENDIF

 

Here is a snippet of an example I created: 

ReplaceString-DeanWest-snippet.png

 

Please let me know if you need any more help with this issue 🙂

Payal1
7 - Meteor

Hi Dean,

 

Sorry the formula did not work. The arrows look like this

 

Payal1_0-1608325537409.png

 

DeanWest
9 - Comet

In addition, you could also use a Find & Replace Tool or Join Tool if you want to use a lookup table (if it suits your use case better).

 

I've attached some more examples below:

 

Create a Lookup Table:

ReplaceString-v2-DeanWest-snippet_1.png

 

Replace the "↑" with an "Up Arrow" string:

ReplaceString-v2-DeanWest-snippet_2.png

 

Or create a flag by appending the "Up Arrow" string to the row containing the "↑".

ReplaceString-v2-DeanWest-snippet_3.png

 

Please let me know if you need any more assistance 🙂

DeanWest
9 - Comet

@Payal1 

To fix the formula replace the "↑" with the Unicode character you are using. You can copy it in the results menu by clicking on a cell that contains the character or copy it from your text input. 🙂

Labels