community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Find & Replace across multiple fields simultaneously...

Fireball

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

 

 

Alteryx Certified Partner

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

Fireball

@JS420 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.

Alteryx Certified Partner

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

Fireball

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

 

Thanks.

Labels