Happy 8th birthday to the Maveryx Community! Take a walk down memory lane in our birthday blog, and don't miss out on the awesome birthday present that all Maveryx Community members get to take advantage of!

Alteryx Designer Desktop Discussions

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

Retaining Field Names when using Field Map for Standard Macro

10 - Fireball

Hello fellow Designers,


When you use a Field Map in a macro and then insert the macro into a workflow, the macro's output retains the field name assigned via the Field Map rather than the datastream's field names.


I'd like to ensure the macro output's field names in the workflow match the input field name(s). This way a user could insert the macro into an existing workflow and not have it break downstream tools due to renaming.


I tried to use a Field Info tool and Dynamic Rename tool within the macro itself (see picture) to "capture" the incoming data's field names and rename the output fields back. However this doesn't appear to work -- the field renaming must be happening intrinsically as part of the Macro Input tool.


I also checked the option in the macro's Interface Designer for "output fields change based on macro's configuration or data input" but that didn't appear to change anything either -- the output is still using the renamed fields based on how I set up the Macro Input tool.


Any suggestions?


Attempting to override Macro field renaming with Field MapAttempting to override Macro field renaming with Field Map

10 - Fireball

Solved this one myself after digging around a bit in the Tool Mastery Article for the Macro Input tool (thanks @patrick_digan !)


From the article:


"[Use] an action tool from our macro input to a select tool to change our field headers back (so that “Year” is returned as “2015” in our example.) The action tool accomplishes this through the “Update Select with Reverse Field Map” option."


I updated my macro and it's working as intended now without changing any of the field names (or rather, changing them back).


Reverse Field Map.PNG