Free Trial

Alteryx Designer Desktop Discussions

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

Field rename from field description (macro)

kat
12 - Quasar

Hi all

 

We have data that always comes out of a system with code names as field names, with the real name sitting in the field description. Fairly easy to fix with field info & dynamic rename. Wanted to package this into a macro for everyone to use. Having an issue though that the names keep reverting to the original ones while one works. One then needs to continuously rerun the workflow to get the names 'live'. How do I force the macro to correctly carry the metadata?

 

field description rename.PNG

 

Thanks!

8 REPLIES 8
MarqueeCrew
20 - Arcturus
20 - Arcturus

Hi @kat,

 

Please try the macro with a few tweaks.  I make sure that the description has a length to it and when it isn't present, I use the Name.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
kat
12 - Quasar

@MarqueeCrew, thanks. 

 

I don't think I explained this very well. All my fields have a field description. This issue comes in that while building the workflow, the fieldnames revert back to the code name. I can place about one tool after the run until they break. I then need to run the workflow to update the field names to keep working. That's quite annoying...

 

It's not an issue when I use the tools outside of a macro though. So my thinking was that because the macro input doesn't have field descriptions they might get lost.

Claje
14 - Magnetar

Hi,


Inside your macro, when you open the Interface Designer (View->Interface Designer or Ctrl+Alt+D), under the Settings screen (wrench icon), there is a check box "Output fields change based on macro's configuration or data input".  Try checking that box and save your macro and see if that helps.  It worked for me in this case, although I have had some complex macros where it does not always solve this issue.

MarqueeCrew
20 - Arcturus
20 - Arcturus

That sounds like a good thing to try!

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
kat
12 - Quasar

Thanks @Claje, looks like it's working!

RPattle
5 - Atom

Now i am facing same issue by changing field name with field description. Can you please anyone help with solution.

 

Below is the field info details from Xtract Universal tool

RPattle_0-1572878297183.png

 

Getting data by field name, but i need to rename with my description. ( I have 100's of fields)

 

RPattle_1-1572878393094.png

 

Finally i need to data with description header like below.

 

RPattle_2-1572878553393.png

kat
12 - Quasar

Hi @RPattle - there's are some very useful tools for this! Check out Dynamic Rename tool and field info. You need to extract the description with dynamic rename and then use dynamic rename to rename your fields. Something like this:

dynamic rename configdynamic rename configtool ordertool order

 
RPattle
5 - Atom

Thanks @kat .. Its working !! 

Labels
Top Solution Authors