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
7 - Meteor

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
18 - Pollux

dynamic rename in formula mode.

ltensmeyer
7 - Meteor

@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