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.
Turns out there's nothing wrong with my macro, just a subtle feature that's likely due to how Alteryx has been improved over time. Since I'm new to Alteryx, I didn't have the appropriate context.
When Alteryx first came out, apparently there weren't a lot of output anchors for users to click on and quickly view their data. Instead, users would have to use a LOT more browse tools throughout their workflows. Batch macros still somewhat exemplify this behavior. As a result, if you don't have any tools connected to your macro output, it doesn't know how many iterations to run or where to stop. Instead, it just runs a single iteration and returns a single row as a test. If you connect a single tool to the macro output, this is resolved (see below). Wonder if macros still need to perform this way or if they would be able to output results in the output anchor like all other tools?
I agree with you. I've been burned by this before. When they added the browse everywhere feature in 10.0 like you're referencing, batch macros are one (the only?) exception where a browse or connected tool would still be necessary.
As someone who started using Alteryx after the browse everywhere feature was added I didn't even realize that was why my macro sometimes worked as intended. @patrick_digan you're a life (read: sanity) saver.
I ran into this with Python and Command cases, where the meat of what's occurring happens outside of Alteryx's jurisdiction, and it thinks it's done before it really is.
Adding a browse as suggested works, but only in Designer. However, when posted to Gallery (which implicitly disables browses), once again, it would end the iterations early. It really, really needs the output stream to be used.
Based on what I could find, the options were:
a) Generate dummy output to satisfy it (invites trampling or race condition)
b) Modify all contributing macros (several in overall process) to not have an output stream (rather not make two versions of each macro)
But I found a way to trick it. I created a simple standard macro with an input stream (template = single column "Any Field"), a count records, and browse.
Placed on the output streams where I didn't want to do anything with the output, this was enough to trick it into still going.
Guts of the macro:
Guts of macro
Calling the macro:
Attaching to output stream I don't care about
Someone more versed than me can tell me a more stripped down version of what I did that would still work (I ran out of fuse a long time ago and stopped at "working").