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 or Dynamic Replace: only certain columns AND only certain values

awisedoesdata
5 - Atom

Hi, 

 

I'm wondering if the community can help me figure out this particular use case: I have many fields in a data table that I'd like to elegantly complete a find/replace on.

 

At one point data was being written into the table with an ID that served as a lookup (1="Low", 2="Medium", 3="High")  and then at a later point the low/med/high values were written directly to the table (in my case I have ~20 fields where I'd like to do a F/R on about 100 ids but leave any non-match text in place. yay!)

 

Here's an example: 

Field_foofield_barnoreplace
12Sarah
LowMediumJane
21Molly
33Cesar
HighLowMary

  

should turn into

Field_foofield_barfield_noreplace
LowMediumSarah
LowMediumJane
MediumLowMolly
HighHighCesar
HighLowMary

 

I've gotten dynamic replace with dynamic field selection to work, but the kicker there is that it nulls all the values in Field_foo and Field_bar that don't match these numeric ids (ie. the ones I don't want to replace). I've gotten the Find/Replace tool to work, but I'd rather not have to use it 20 times or need to modify this flow if, say another 3 fields get added. 

 

Any suggestions? 

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

With joins that may change in left my common approach is to tranpose the data. This may work in your instance! Then you will always be joining on a single field.

Ben

awisedoesdata
5 - Atom

Hi Ben, 

 

I hadn't thought of Transpose; what a great idea! With that, I got my flow to work. 

 

Thanks!

Labels
Top Solution Authors