Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Iterative Macro With Multiple Outputs

OneandOnly13
8 - Asteroid

Hi - I created an iterative macro where there are multiple macro outputs inside of the macro but the data will only flow through one of them. The potential issue I'm seeing is that when placing the macro on a workflow, there are then three output green arrows from it. Is there a way to know which output is which? Or better yet, a way for there to only be one macro output since there will be only one macro output anyways. I attached some images for reference. I would need to cleanup the macro to actually upload as an fyi due to data concerns. The macro basically has 3 flows with filters that create business logic. One output is to create an extract of the data if the extract doesn't exist, one to union new data to the existing extract, and one that will update the extract with the latest data if the number of rows matches (idea being that this part of the flow would be for testing the workflow the macro is in and it doesn't duplicate any data). Again, so the data itself would only ever go through one of the macro outputs.

Iterative Macro in a Workflow.jpg

 

Inside Iterative Macro.jpg

 

 

 

 

4 REPLIES 4
CharlieS
17 - Castor
17 - Castor

On the Macro Output (and Macro Input) tool, there's a text box labeled "Anchor Abbreviation" that is normally blank. If you put a single character in that box, that character will be applied as a label for that anchor on the macro icon. 

 

20190424-AnchorLabel1.png20190424-AnchorLabel2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Most of the time when working with iterative macros, there will be a "Loop" output that will return to the input as controlled by the macro properties. It is possible to design iterative macros without this, but most of the time it's a safe bet to just leave it. An "L" label will help to know which output to ignore! In your posted image, those other outputs may not be necessary if they are not looping or designated as the final output in this iterative process.

OneandOnly13
8 - Asteroid

Thanks @CharlieS ! So the data can change depending on the input which would then change which path the data would take. The data can only go through one of the outputs. Is there a way that you know of that could limit the macro outputs to be only 1 output anchor or should I split this into 2 macros?

CharlieS
17 - Castor
17 - Castor

Happy to help!

 

In the scenario you described, you would need to union those three output within the macro so there's only one Macro Output tool. If the output schema (fields/types) are different between each of  the current output, it might be best to keep them separate so you handle each scenario appropriately. 

OneandOnly13
8 - Asteroid

@CharlieS 

 

Ah that makes sense! So in theory because there will only be one output it would be unioning nothing with the actual data. All of the fields would be the same so this should work. Thank you!

Labels