ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

General Discussions

Discuss a wide range of topics! Questions about the Alteryx Platform should be directed to the appropriate Product discussion forum.

Send the iteration number in a variable to a iterative macro

5 - Atom

Hi, please, need help!

I have this iterative macro:




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.



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



Can someone help me?



17 - Castor

Hi @pzannier ,


Here is how you can achieve it.


Main workflow



Iterative Macro


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 : ) 


5 - Atom

Thank you very much! I'll try it!

17 - Castor

Hello @pzannier ,


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


Thanks : )