We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to transform a repetitive occurence of my workflow into an iterative macro

RomainDv
6 - Meteoroid

Dear Community,

While process a dataset presenting a hierarchy, into a tab where each "child" is characterized by its level in the hierarchy, I had to repplicate, in my workflow, the sam-sub-workflow 8 times (as there are 8 levels in my hierarchy).

This is not very convenient, and would like to be able to transform this repetition of the same workflow, into an iterative macro (I understand this is the tool I need), that would iterate up untill all the children in the hierarchy, got their level # set (which may not be 8, but rany other random number in other dataset).

Can anyone help me out regarding this ? Much appreciated.

Attached - the workflow & the dataset; the repetitive portions are located into the tool Containers (7 times the exact same). Thanks

 

Romain

2 REPLIES 2
CoG
14 - Magnetar

Here is the iterative macro version of your process. It should be fairly easy to follow and learn from cases like this:

Screenshot.png

Hope this helps and Happy Solving!

RomainDv
6 - Meteoroid

Thanks for the reply, this is very usefull.

I managed to appropriate and replicate your solution

The next stp of my workflow is to append, for each child, the name of its parent N+1, n+2, etc.. up untill the ultimate parent.

I designed it in the attached, through the successive use of the tool "Find & Replace".

Although this solution is working, it is not very elegant and once again, needs to be tailored (number of occurence depends on the hierarchy). I have some other hierarchies where this will imply to multiply the use of this tool for c. 15 or 20. times.

Can you figure out a way to handle this via a macro ? (with a number of occurence that would depend on the number of levels in the hierarchy)

Many thanks in advance

Attached: workflow

 

Labels
Top Solution Authors