Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

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

Highlighted
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?

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.

Labels