Alteryx Designer Desktop Discussions

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

Replicate For Loop in Alteryx

Chriszou
8 - Asteroid

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.

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@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.

mceleavey
17 - Castor
17 - Castor

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:

 

iterative.PNG

 

This will allow you to specify how the iteration will end and what will be the outcome.

 

Hope this helps,

 

M



Bulien

Labels