Alteryx Designer Desktop Discussions

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

Multiple Find and Replace in the Same Field

mkeiffer
8 - Asteroid

Hi there,

 

I was wondering if it was possible to do a find and replace in my data with Alteryx, looking to replace multiple values in the same field and in the same record.

 

For example, I have a field in my data called Address and I want to search every record the Address field for the following values;

 

West 

W.

Street 

St. 

Avenue 

Ave

 

So if I found any of these values in the same field, in the same record, I would want to replace these values with a blank space.

 

I have done this test in other languages and applications by having a separate list of all the replacement values and I would usually bring in this last as a separate table or as an array, and I would loop through the entire list for the Address field for each record.

 

Can I build a similar workflow in Alteryx to accomplish the same thing?

 

Thanks in advance for the help!

 

Mike

4 REPLIES 4
ArtApa
Alteryx
Alteryx

Hi @mkeiffer - You need a Find Replace tool:

ArtApa_0-1673913527536.png

 

DataNath
17 - Castor

Hey @mkeiffer, if I'm reading into this right, do you mean something like this?

 

Address list:

 

DataNath_0-1673913445495.png

 

Lookup table with targets and replacements:

 

DataNath_1-1673913462239.png

 

Find Replace result:

 

DataNath_2-1673913476373.png

 

Depending on your requirement, you may want to play around with the FR configuration i.e. case sensitive, replace multiple items etc, but hope this helps to get you going! To clean up the new whitespace you could also just add a trim step afterwards in a Formula tool.

mkeiffer
8 - Asteroid

Hi Datanath,

 

Thanks so much!  This looks like it is definitely what I am looking for.

 

I will play around with the WorkFlow but this looks great.  Many thanks on this!

 

Mike

mkeiffer
8 - Asteroid

 Hi ArtApa,

 

Thanks for pointing me towards the Find Replace Tool and for taking the time to answer my post.  Much appreciated!

 

Thanks again!

 

Mike

Labels