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!

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Send the iteration number in a variable to a iterative macro

pzannier
5 - Atom

Hi, please, need help!

I have this iterative macro:

 

pzannier_0-1589428379556.png

 

The condition at red circle is iteration>=1000 so, 1000 is my limit, but I need that value to be a variable, I mean to update that value with the number of records that I have in the workflow where I call the Macro.

 

I got the max_value, (for example 485) at green circle, so, I need to send that value, to my macro to update the condition.

pzannier_1-1589428711955.png

 

I tried to use a control parameter, but like my max_value has one row, the macro just iterate once.

 

 

Can someone help me?

 

Thanks!!!

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @pzannier ,

 

Here is how you can achieve it.

 

Main workflow

atcodedog05_0-1589434228002.png

 

Iterative Macro

atcodedog05_1-1589434261511.png

Append limit column and compare it with Engine.IterationNumber (an Alteryx variable created by a iteration macro). Workflow is attached.

 

Hope this helps

 

Cheers and Happy Analyzing : ) 

 

pzannier
5 - Atom

Thank you very much! I'll try it!

atcodedog05
22 - Nova
22 - Nova

Hello @pzannier ,

 

Please mark my post as "accept solution" if it solves your usecase.

 

Thanks : )

Labels