I need to create a macro that checks a value in a table. Example of the value 0 and 1. When it is 1, execute a workflow and when the value is 0, do not execute the workflow.
Solved! Go to Solution.
Hi @jcastro
You can use the attached macro. You just need to map the indicator field and change the runtime settings to stop the workflow on Error.
Let me know if you have any questions.
Best,
Michael
Hi @michael
Thanks for the solution. I was just confused where the workflow would go to run?
jcastro
Hi @jcastro ,
I would set it up so that:
1) it queries the data source that says if the workflow should be run.
2) this macro is inserted after that tool to check if everything else should be executed.
3) run a dynamic input to connected the output of this macro to begin the rest of the workflow.
Does that help?
Michael
Would the path look something like this? What more parameterization do I need to perform? Sorry for my lack of knowledge. I haven't used these components yet.
jcastro
Hi @jcastro,
I am not sure what your workflow looked like because it wasn't packaged but I have attached a packaged workflow for you to review.
If you have any questions about packaged workflows see the following links.
https://help.alteryx.com/2020.2/AlteryxFiles.htm#YXZP__Packaged_workflow_
https://help.alteryx.com/2020.2/ModulePackager.htm (Export a workflow)
Thanks,
Michael
you need conditional runner macro, you can find it under crew macros
Thank you very much for your solution, it will meet my need. And also for the tip of generating a package for sending the workflows.
jcastro
Hi @MichaelLaRose,
Your attached macro solved the verification I need. Now I am trying unsuccessfully to connect my workflow that currently starts with a query inserted in an input data tool. I'm trying to use the dynamic input tool as suggested in the macro output, but I don't know how to use my query inside it. Can you help me?
It is worth mentioning that I do not need to make any changes, insertions or changes to the data in my workflow. The output of the macro will only be used to continue or not with the execution of the workflow.
I think for this reason I am not able to configure my query using the dynamic input tool.