Alteryx Designer Desktop Discussions

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

Macro to Rename An Identified Field

redcoop55
5 - Atom

Hi Team 🙂

 

Apologies if this is a stupid question. I am looking to create a macro that will rename a string field from the incoming data connection to 'Customer ID' and date field to 'Date'.

 

I work with many different data sources and the 'Customer ID' and date fields almost never has the same name between data sources (e.g., 'Customer', 'Client', 'Customer Number', ect.). I would like to put this macro at the beginning of a workflow where I can map a field so it will change the field name from the selected field to 'Customer ID' and 'Date'

 

I have attached sample data that I am working with below. 

 

Regards,

Brad

3 REPLIES 3
Tyro_abc
11 - Bolide

Hi @redcoop55 

 

Not sure if I understood how that final structure would be, but tried something based on my understanding. Inside Macro, I used an Text Input to have possible list of names for customer and replacing them dynamically using "Dynamic Rename" tool. Please let me know if this is something you are trying to achieve. 

 

 

 

 

Best Regards

Arundhuti

redcoop55
5 - Atom

 Hi @arundhuti726.

 

Thank you so much for getting back to me. I did see this solution posted online previously. I was hoping to have a option to "select" from a dropdown menu the one field from the incoming data that would then be renamed as customer ID. For example, I could have data with the field names [name], [type], [date], [amount] where I would like to map whichever field I want to customer ID (in this case, it would be the [name] field but the macro would also allow me to map [type]  as the field to be renamed to 'Customer ID' if I chose to). Does that make sense? 

redcoop55
5 - Atom

I figured it out. It is simply to use the desired column information as a text input and use the "Show Field Map" on the macro input tool. Thanks @arundhuti726!

Labels