We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How do I dynamically identify a column based off of Regex

sp210708
8 - Asteroid

I created a sample Input file. The input file will be different every time as it comes from external vendors. (so I can't use position of column or column names)

I'm close to a solution from a logic perspective but missing some pieces.

 

Ultimately I need to dynamically identify which column is the one with Zip codes (5 digits in a row) and then rename it to a common name say "ZIP CODES" so then I can use that moving forward with my workflow.

 

Multiple columns could contain 5 digits in a row so I need to something along the lines of counting the times a regex matches and then sorting the columns to figure out which one is the column needed to rename.

 

Thanks,

Shane

 

 

2 REPLIES 2
alexnajm
18 - Pollux
18 - Pollux

Sounds like a Dynamic Rename tool and applying the logic there with Rename Mode = Formula! Once you figure out the logic let us know so we can try to help.

FinnCharlton
13 - Pulsar

Hi @sp210708 , here's one approach:

Screenshot 2023-08-15 170727.png

Labels
Top Solution Authors