Hi Alteryx Community,
I’ve built a macro that takes in a control parameter value and two data inputs. This macro is part of an If condition stream in my workflow. However, there are cases where no control parameter value is passed to the macro, which results in an error (screenshot attached).
To avoid the workflow stopping due to this error, I’d like to find a way to skip the macro's operation entirely when no control parameter value is provided. The rest of the workflow should continue as usual.
In short, is there a way to bypass the macro's execution when the control parameter value is empty or missing at the ? anchor? Any tips or workarounds would be greatly appreciated!
Thanks in advance!
Solved! Go to Solution.
Can you use Control Containers and the Use Case #3 option? Control Containers: Take Control of Your Workflow - Alteryx Community
Thank you for suggesting the use of a controlled container! It’s a great approach, but I ran into an issue—since I need to union the outputs, an error occurs when the controlled container does not run.
I'm sorry, but I don't see unions in the attachments provided so we will need more context in order to help further
I am not sure I am getting the same issue, here's a simple version attached that works fine - maybe because of the macro? In that case, maybe you can force a blank row so at least something comes out of the container
Otherwise a Detour tool as @OTrieger mentioned could work well if you have a value from a macro/app to shift the workflow!
@hcho
That is why Detour tools will give you the most simple solution for that, as you will have 2 different routs and always one is disabled and no need to worry on any union.
@hcho
In the past, before control containers were a thing, I would 'disable' a macro by putting its contents (bar the outputs/interface tools) in a disabled container, and then enabling the container if the control parameter had a length >=1.