Alteryx Designer Desktop Discussions

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

Passing a value to Interative Macro

apichart
7 - Meteor

Hello,

 

I have been using standard and batch macros for a while but recently I have a use case to use an interactive macro.

 

Inside my interative macro, I have two sample tools that pick a number of rows to process, and a number of rows to skip at each run. At the moment the number of rows is a constant but if I wanted to pass a value from outside and say that this number can be dynamically changed. How can I achieve this using an Interative Macro?

 

In a batch macro, I can easily use a Control Parameter to do the job but I am not sure if I can do the same for an Interative Macro.

 

Thanks.

Api 

2 REPLIES 2
MichalM
Alteryx
Alteryx

@apichart 

 

Will that value be defined upstream in the workflow? Or do you want to have it as a configuration option of your macro?

 

If the former, the control parameter is still going to work - a single value will be passed so your iterative macro will only run once (a single batch).

If it's the latter, you can use a Numeric Up & Down tool to feed the value in just like you would in a standard macro.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @apichart,

 

You could use interface tools inside the macro, in this case i've used a text box and action tool to update the value of the sample tool inside the macro. You could equally use a numeric up down tool.

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow (macro) and another of it being used for you to download if needed.

 

Regards,

Jonathan

Labels