Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

Find & Replace across multiple fields simultaneously...

Highlighted
11 - Bolide

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

 

 

Highlighted
Alteryx Certified Partner
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

Highlighted
11 - Bolide

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

Highlighted
Alteryx Certified Partner
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

Highlighted
11 - Bolide

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

 

Thanks.

Labels