Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?


Batch Macro - Control Parameter Issue

Hello All,


I am a relatively new user and - thanks to a great deal of help at the recent Alteryx Inspire conference in Las Vegas - have been motivated to create a workflow that utilizes a batch macro (shout out to Peter in the Solution Center).


The macro works fine when I run it independently; however, when I embed it into an app I keep getting the error 'Control Parameter ... must be mapped to a field'.  I can't figure out where things are going awry.  From what I can tell, the Control Parameter is updating every tool that needs to have dynamic inputs for the macro, but it's still giving me an error.


Any insights into this issue would be greatly appreciated, thank you!


I've attached the App in question (with the embedded macros) for reference.

You will need to Package your workflow for us to get your Batch Macro along with it (right now you only sent us the outer workflow and not the macro itself).  Go to Options > Export Workflow, and make sure any necessary files are selected.


Generally, that error just means that you need to click on the Batch Macro in your outerworkflow, change from the questions tab to the other one (in the configuration panel) and choose which field you want to use as the control paramater.


You're doing great, keep working at it and soon it will be second nature!

Hi David,


Thank you for your response!  I updated the macro within my application per your recommendation (changing the 'Questions' input) and am now getting 'Parse Error at char(0): Unknown Variable' error for each field that the macro is supposed to work on.


Any next steps?


Please see attached for macros


Looking good so far - it seems that you actually want to use a different type of interface tool on the first piece that selects the Column Name (and maybe even the last action tool that changes the variable name field?). 


Control Parameters look at the actual values in your fields, so the first batch will take the values from column Voice, as well as whatever column you select as your filter, rather than the name of the column 'voice' you are looking for.


What the batch macro passes:


In this table, the batch macro is trying to pass 1 as the Column name, not 'Voice'.


To get the names, you could try something like a Dropdown. The dropdown will pass the actual value (name of the column in this case) you see in the dropdown as the value through the action tool. Key is to connect the Q input of the macro to the Dropdown - this takes the fields from what comes into the macro and makes them available in the Dropdown:




Now, in the main workflow containing your macro, you will see you have the fields available to choose in your Configuration window:





Hopefully I got the jist of what you are looking to do - also, @PeterS definitely rocks!

Sophia Fraticelli
Customer Support Engineer

Hi Sophia,


Thank you for the response!


Using your suggestions, I was able to clear the errors and get the app to run; however, I can't seem to get the field 'var name' to populate properly.  The four tools in the Batch Macro List toolbox are there to create a list of all possible fields (ending in a Summarize) that are being fed into the Binary path of the app.  The fields will always be: ATZ_HHLD_W, GEOCODE, and any number of additional variables.  The macro is supposed to use the Control Parameter Input from the Batch Macro List to count all instances of each variable that is NOT named ATZ_HHLD_W or GEOCODE and process those counts inside the workflow.  Once  counts have been processed, the final formula again uses the Control Parameter to assign the proper variable name to each processed count.  If it's working properly using the sample data set that was created to test the app, each value in the Geo Score column should have either X1 or Voice next to it rather than name (since those are the only 2 variables being fed into the macro).  If you check the macro in the Categorical stream, you will see how the values should be presented after passing through it.


I may be completely into the weeds - and it is very late here so I apologize if I am - but what I need to figure out next is how to get the Control Parameter feeding into the Binary macro to recognize that it needs to rename each cell in the 'var name' column according to the data that it is processing for that batch and repeat until there are no variables left.


Again, sorry for the rambling and since I am new to this part of Alteryx I have trouble articulating exactly what I want to do or what I think should be done where.


I've attached the updated files for reference.


Thank you!




@TravisJWhite - would it be possible to send over a packaged version? In the Designer - Options > Export Workflow, then just make sure the .yxmc files are checked and hit Save. Thanks!

Sophia Fraticelli
Customer Support Engineer

Hi Sophia,


I've attached the packaged version of the app, please see below.






Couple quick fixes - the macros look great!


For Index macro - dropdown2:

The last Action tool (31) should have Replace a specific string: Name instead of 'Column Name'.


For Index macro with Filter option:

Action tool (31) should be receiving input from the 'Column Name' control parameter, instead of the Filter Value control parameter.

Sophia Fraticelli
Customer Support Engineer

Thanks again, Sophia!


I made the changes to the Index Macro - Drop Down2; however, it still seems to only be acting on one variable (Voice) and running each batch on that variable - not running a second batch on the second variable (XX1).  This leads to duplicate values in the output.  It seems to me like the macro recognizes a number of variables that it needs to act upon, but only performs the calculations using one (Voice)? Can you offer any guidance on how to direct the Drop Down macro to correct this?


The Filter Macro is actually working almost perfectly.  The control parameter for the Filter Macro needs to be connected through the filter because each calculated value is named after whatever values are pulled through the filter for each batch.  


Both macros seem to be performing calculations on the ‘ZIP_ATZ’ field and that is another issue that I will need to address as well, but my primary concern is getting the Drop Down macro updating the ‘var name’ field properly.


I've attached the updated version of the app to this message.


Thank you again for all your help!




For Index Macro - Drop Down2, it looks like you changed the input data a bit. Before, you had data in columns and were trying to pull the column name (which a Control Parameter won't do, since it looks at the actual values in the field as we talked about previously). But now that you have the column names actually listed (see after your Summarize tool in the main workflow), you no longer need the Drop Down - you just need a regular Control Parameter. A little confusing, but basically you want to go back to your original design for this.


For the macro with the Filter option, it looks like you need to connect the last Action tool to the first Control Parameter (Column name) rather than the 2nd (Filter value).

Sophia Fraticelli
Customer Support Engineer