This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have a workflow that calls a batch macro to run through multiple store locations and exports an excel file with a sheet for each store (The sheet name is also controlled by the control paramter that is being fed in).
This works absolutely fine while running as a normal.
I decided to design it as an analytic app instead of a workflow, so that users can change the files (different months of the year) being fed in to generate the excel file.
Once I did that, the macro batch does not loop anymore.
The message I got from the App Results was "1 iterations were run (ended by a downstream tool)"
I did search up this error, it seems that users are missing a browse button in the workflow / output button in the macro. However, I have both buttons in my workflow.
If I switch back to running it as a workflow, it will work fine and generate an excel file with multiple tabs.
Wondering if anybody encountered this problem before or am I missing a setting so that it doesn't loop at all.
Can you help me understand tho, as to how how come when I ran it as a workflow, I can leave the output icon there and it will be fine, but once I run it as an analytic app, I have to remove the output button?
I figured it should be the same since running it as an analytic app is just asking me for inputs?
So, since that worked - here is a layman's explanation of what is going on behind the scenes.
Since Alteryx has an engine that focuses on optimizing workflows, it builds out an execution plan each time it runs the workflow. In doing so, it tries to improve performance wherever possible, cutting out things that aren't needed. Another example of this is if you use a Sample tool immediately after an Input data tool and bring in only the first record, Alteryx will stop reading in records after that point, saving you from loading a bunch of extra data you weren't going to use anyway.
When you run your workflow in the Designer, since you have the browse tool connected to the Macro Output (and/or because browse anywhere is enabled), Alteryx will run all the way through to give you your full result set. What changes when it is an application is that Browse tools are automatically disabled, which looks like it is changing your execution plan. Because of this, Alteryx is looking at the workflow and saying "nothing uses this data after it is output", and stopping the execution early.
However, when there is no output, the macro is the end point, so it runs all the way through.
I hope this helps to clear things up, and that I did a decent job of explaining how I understand things like this to happen!