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'm new to Alteryx and I'm trying to do some data process automation in a workflow. Neither the tutorial, the community or search engine could provide the solution so time to ask in the forum.
In perspective of automating data generation process, I need to test for a condition. Depending on the case, one or other workflow should be executed. Is there a way to do that in Alteryx?
As in my specific example, I have a control file in text format that can contain either an one or a zero (it's being used as a semaphore). I'd like to check this file and if it is an one I'd like to run one workflow, else I'd like to run another (and this other one also has some conditions - like a chained if statement). So far the only solution I found was to use the TEST TOOL to see if the condition is true/false and then use events/Run after with/without errors, to execute one workflow or the other. However, this solution seems bad, not to mention clumsy in the case of many conditions.
The only way I can think to do this is to add a filter for the condition test, then add a macro for workflow 1 and 2 after the T/F outputs. This would then pass the data that you need through the workflows needed.
@krysten's method will work great for most situations - just use a Filter tool to pass the data stream into one side or the other.
If you would like something more explicitly like control flow, you can check out using the Detour tool which is typically controlled using interface tools, so it requires wrapping the whole workflow into a macro.
Well, not exactly. I'd like a tool to check if it is 0 or 1 and depending on the selection, use different workflows with possibly different data inputs as well. If we have some kind of multiplexer tool in which it uses a control input to select which input data to use that would be perfect. Since it doesn't exist, I'm trying to get alternatives.
Kind of like this:
____ Run Workflow1
ControlVariable(0,1,2) -------------------- SomeTool --------- Run Workflow2