Hi,
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.
What is the correct way to do that in Alteryx?
Thanks,
Nelson
Solved! Go to Solution.
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.
Is this similar to what you were thinking?:
@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
\
\
\___ Delete a hardisk file
Something like this.
why not create a batch macro to do this?
Can you provide an example? It'd be easier to explain if we have a specific use case to work off of.
Just updated the answer with one example.
Which type of batch macro could do this? Batch macro, per my understanding, would only add iterations, not more paths of execution.
Hi,
It seems to work. Not very simple to implement, though. I will mark this as solved in any case.
That said, I'm disappointed with Alteryx, that it would require such complexity for something that is equivalent to an if statement.
Thanks!
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |