cancel
Showing results for
Did you mean:

Alteryx Designer Ideas

Share your Designer product ideas - we're listening!

Iteration Tool

I find the concept of Batch and/or Iterative macros, when done specifically for the simple purpose of iteration, to be a fair bit of overhead. If we could extract the fundamental qualities of a loop and get that into an "Iteration Tool," it could become a well-used tool from the pallette.

Implementation Ideas:

• Assume that the iteration is over the rows of a given input data set.
• For the "body of the loop" allow multiple expressions, each of which iteratively assigns the i'th position of a given variable (which could be either existing or derived just like the Formula tool and it's expression).
• Allow referencing of the loop index variable from within expressions

An example problem this could solve is from: http://community.alteryx.com/t5/Data-Preparation-Blending/Looping-and-dynamically-changing-output/m-....  As discussed therein, the concept of "row dependent iteration" makes this difficult to solve with standard tools.

If the input data set from that example were sent into the proposed Iteration Tool... it would automatically loop over the dataset rows; and three expressions could be supplied in the Tool configuration to solve the problem:

```VarE:   IF [i] > 1 THEN VarF[i-1] + VarG[i-1] ELSE VarE ENDIF
VarF:   VarA + VarB
VarG:   VarC + VarD```

For implementation purposes, this would be logically equivalent to:

```VarE[i]:   IF [i] > 1 THEN VarF[i-1] + VarG[i-1] ELSE VarE[i] ENDIF
VarF[i]:   VarA[i] + VarB[i]
VarG[i]:   VarC[i] + VarD[i]```

(so, basically, the i'th row is assumed unless otherwise provided in the expression syntax).

I hope this isn't too outlandish - I've tried to think through how this could be accomplished (1) as a tool that is not too fiendishly difficult for Alteryx to implement and (2) which would also be easy for us, the end users, to utilize.  Thanks!