Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Field Mapping Macro

Inactive User
Not applicable

A task we often undertake is cleaning data with Alteryx. Part of this includes creating what we would call mapping tables where we will generate a list of unique values in a data source, provide each value with an ID and write that "mapping table" to a file where we can make manual edits. We will then join it back into the original data source to update the values. I was hoping to make a macro that facilitated this mapping table creation process as well as creating IDs in the original data. 

What I would like to do is read a workflow into a macro, select the fields that will be used to create unique values, provide those fields with a mapping id and then join only the mapping id back into the original data. I have attached a workflow that attempts to do this. However, I am unable to figure out how to parameterize the unique tool to select the appropriate fields and the join to select the appropriate join elements (and deselect the right join fields).

 

If anyone has any insight as to how this could be accomplished it would be appreciated!

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

Hi @Inactive User,

 

Your right to be confused with this one, it certainly isn't an easy problem to solve but here is my attempt (macro attached).

 

Note the key here lies in how I have configured the 'list box' tool, which I have changed from 'Select tool mode' to 'Generate custom list'.

 

The subsequent actions then update the xml properties of the tool to complete the appropriate tasks.

 

In order to understand what the XML needs to look like for each tool you must ensure you have the 'Display XML in properties window' option selected, which can be found at: 'Options' > 'Edit user settings' > 'Advanced'. Now when you select a tool, you will get a new option down the left side of the configuration panel which gives you visibility on what the XML of that tool looks like with the current configuration.


Inactive User
Not applicable

This is great thanks! I also appreciate the type on how to expose the XML!

Labels