Hi,
I have a random question regarding how to replicate a for loop in Alteryx. I am trying to create a macro that use the input from the last iteration as input for the current iteration in a macro. For example, at iteration 1, we feed the initial input to the macro. At iteration 2, the macro will use the output from iteration 1 as input. At iteration 3, it will use the output from iteration 2 as input. The macro will loop until certain criteria is met and the output is the output from the last iteration (instead of output from a normal macro which union all outputs from each iteration. ). Does anyone how to accomplish this in Alteryx ?
Thank you.
Solved! Go to Solution.
@Chriszou You've just described an iterative macro! You can look on the community or the tutorials/samples that ship with alteryx to learn more about iterative macros.
EDIT: I guess I should mention that depending on your situation, the generate rows tool and/or the multi-row formula tool can also be used in lieu of an iterative macro.
Hi @Chriszou,
You're looking for the iteration settings in the interface designer window.
When you've built the macro, ensure you've set it as an iterative macro in the "Workflow" tab of the "Workflow Configuration" window.
Then, click "View"->"Interface Designer" or Ctrl+alt+D.
In this window, click the spanner (wrench) menu. You will see the following options:
This will allow you to specify how the iteration will end and what will be the outcome.
Hope this helps,
M