Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Renaming columns if they contain certain strings

ltensmeyer
8 - Asteroid

Hi,

I'm trying to create a macro that can read medical records and automatically return an estimate of duration based on a diagnosis. The files I'm reading come from multiple sources and therefore don't have consistent column names or titles. Most of them contain the strings "PRI" and "DIAGNOSIS". What is the best way to look for a column containing those strings (even if there are other strings between them) and rename them all to "Primary Diagnosis" for use in the macro? 

Thanks!

2 REPLIES 2
apathetichell
19 - Altair

dynamic rename in formula mode.

ltensmeyer
8 - Asteroid

@apathetichell Thank you! I've been trying to work with dynamic rename, I'm having difficulty creating the correct formula:

ltensmeyer_0-1684170043033.png

 

I haven't used dynamic rename before so I'm sure there's something I'm just not catching in the examples. Any ideas?

Labels