Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Can we have more than one Control parameter in a batch macro?

Ashish
8 - Asteroid

I am working on a batch macro where I want to use two fields as control parameters. I am wondering if that is possible?

 

Basically I want to use a table as input for control parameter, which has two fields.

 

1A
2B

 

I want to cross product the two fields as my control parameter. 

1A
1B
2A
2B

 

I have created a combined field to use as the control parameter

1A1A
1B1B
2A2A
2B2B

 

Now I want to use the first two fields as control parameters to use them in two separate filters because its not desirable to create a combined field in the input data source for running the batch macro.

 

Can we do this?

3 REPLIES 3
rohanonline
10 - Fireball

Hi @Ashish

 

Yes, you can you pass two (or more) parameters in batch macro. To do this, in the macro, just insert as many 'control parameter' tools as the number of input parameters. In this case, whenever you will call the macro, it will ask you for the input streams for each parameter.

 

However, in this case, it takes the values of all the fields by row. So you may still have to create the Table 2 that you have mentioned in the question, i.e.

1A
1B
2A
2B

 

In case you take the original table, only two values will be passed to the macro - 

1A
2B

 

By the way, you can get the Table 2 by simply using 'append fields' function.

Piyali_517
5 - Atom

Hi, @rohanonline,  can you send the workflow, so that it will be easy to understand about the multiple control parameter concept or you can send me any link where workflow has been given using multiple control parameter.

apathetichell
19 - Altair

I think the confusion here may be in that there are two questions:

1) Can you have more than one control parameter (sure!) - but make sure to label them. This is pretty straight forward - just use two control parameters to two action tools - to two filter tools. You have now mapped two fields in your batch macro.

2) Can you have more than one datastream going into the batch macro control parameter input - No. This can be fixed via an append data tool or other join in your main datstream so you can create your grid of values that you would expect for each batch macro run. You will then use the questions feature on the batch macro to map the correct field to each of the control parameters.

Labels