Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Macros - iterative or batch, and can a batch macro loop to call itself like iteratives?

Archaeopteryx
10 - Fireball

Can a batch macro loop like an iterative and call itself again and produce output? I attempted to set up this macro as iterative but it accused me of not having an iteration applied, but the questions were all answered. 

 

I then told it that it is now a batch macro, and it processed itself one time from running the main workflow, but did not loop or repeat. I have included a screen shot of the macro itself. Maybe the fault can be found in its construction(?)

 

In the previous version 1.0 workflow, this process you have before you was replicated 20 times - in the main workflow - not as a macro, but that is not enough replications to process all the potential data and the workflow is becoming too big aside from just being bad practice. I know there's a better way. 

 

Any suggestions are appreciated. 

Chris

6 REPLIES 6
BenMoss
ACE Emeritus
ACE Emeritus

"I attempted to set up this macro as iterative but it accused me of not having an iteration applied, but the questions were all answered. "

 

In the interface designer (when this was an iterative macro), did you specify which output and input should be linked together? The above sounds like the kind of error message you would get if you hadn't done that.

 

Ben

Archaeopteryx
10 - Fireball

I answered all the Questions mapping the fields, and even set them to the data type suggested. Same error message, The iteration input "" is not present. 

Archaeopteryx
10 - Fireball

When I set it up as a batch macro, I get one pass-through with output, but no more after that. 

clmc9601
13 - Pulsar
13 - Pulsar

Hi @Archaeopteryx,

 

If you want to incorporate both the control parameter customization of batch macros and the looping of iterative macros, I'd recommend nesting an iterative macro inside your batch macro (or vice versa, if that doesn't work for your use case). If you use an interface tool to bring the piece to customize to the configuration window on the outside of the macro tool, I believe you'll still be able to connect the control parameter to it. I hope this helps!

Archaeopteryx
10 - Fireball

Hi clmc9601

 

Thank you for your reply. Can you show me what that would look like? If you have a look at my screen shot of the macro, I have the False path of a filter serve as "re-input" to the first filter tool's inlet. The grouping being the next increment of a counter variable used to label the outputs of each iteration of the macro. 

Shalz
8 - Asteroid

This can be a nested macro or batch macro with detour to make sure it satisfies the looping condition and can come out after reaching the limitation

Labels
Top Solution Authors