Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Find & Replace across multiple fields simultaneously...

hellyars
13 - Pulsar

Hi,

 

I want to replace "AND" with "&" across multiple text fields simultaneously.  How can I do this without resorting to multiple iterations of the F/R tool tool or a formula?

 

Thanks

 

 

5 REPLIES 5
JosephSerpis
17 - Castor
17 - Castor

Hi @hellyars I would use the multi field tool you can select all the text fields and then use one replace formula for all those fields. Below is a mock setup that you would need.

Multifield.PNG

hellyars
13 - Pulsar

@JosephSerpis How can I add a second or third expression, such as replace "Miscalaneous" with "MISC" and "Continue" with "Cont"?  I tried adding a second expression using the connector &&.  It did not work.

JosephSerpis
17 - Castor
17 - Castor

Hi @hellyars if you use this syntax in the Multi field tool with your selected fields this should work. IF Contains([_CurrentField_], "AND") THEN Replace([_CurrentField_], "AND", "&") ELSEIF Contains([_CurrentField_], "Miscalaneous") THEN Replace([_CurrentField_], "Miscalaneous", "Misc") ELSEIF Contains([_CurrentField_], "Continue") THEN Replace([_CurrentField_], "Miscalaneous", "Cont") ELSE [_CurrentField_] ENDIF

hellyars
13 - Pulsar

@JosephSerpis  I was just trying that approach, but I had the parentheses messed up.  

 

Thanks.

Ncardenas
8 - Asteroid

Wow, this is a seriously awesome tool! I immediately thought of using multiple find/replace tools, but the multi-field tool was already there! I'm using a public dataset on car sales.

Ncajamarca_0-1636908210890.png

 

Labels
Top Solution Authors