Hello community, I'm wondering if there is a way to have alteryx run one flow, or another depending on a conditional property. I know the tool [Detour] allows to run either of two separate flows, but it depends upon a checkbox. What I'm looking for is a way to automate the checkbox to be checked if and only if, a logical condition happens.
In all basic terms, I want a tool, or combination of, that allows me to do something similar to a "Do if" from any programming language.
I have searched both google and the community and haven't found anything even remotely close, any help is greatly appreciated!
Solved! Go to Solution.
Hi Ehatie,
Take a look at this quesiton:
And you may see that what you are looking for is the Conditional Runner Macro by @AdamR_AYX. Check out his Macro pack at http://www.chaosreignswithin.com/2015/10/crew-macro-pack-2015-q3-release.html.
This would enable you to start another module based on a condition.
Hello KaneG,
Downloaded the macros package you mentioned, however I more or less understand how the tool would work. Just tell me if what I'm thinking is right.
The [Conditional Runner] will open a background flow which should end in a test tool, if the test is true, it runs the true output, else the other. However, the part I'm doubting is if I should truly use a test tool, or should just try to run the conditional workflow and make it so that it somehow fails.
Thanks!
Hi Ehatie,
Yes, that is one way that it can be done as depending on whether there is a failure the data will come out the other side of the conditional runner tool.
The other way to set it up would be to have a filter tool before the conditional runner that either gives the data to the conditional runner macro or not. The reason for the conditional runner macro still being needed some times in this case is that some tools do not like being in the workflow but not having any data fed to them. It also allows you to segment the process easier into different modules for large conditional flows.
Kane
Hello again,
Could you possibly provide a working example, it would be incredibly useful for people who aren't used to using the macro.
Thanks!
Hi Ehatie,
Sorry about the delay, I don't happen to have a working example handy. However, if you didn't want to use the test tool like in your example, due to having to pass data between modules, you could use it in the way I described whereby you can set a field as your condition and then filter on that field. In the below example, I have used the CountRecords as my Condition field, however you could have any flow there to work out you're condition. Then append that condition back on and filter the fields based on the condition. You can then have a conditional Runner on each of the outputs of the filter to kick off whichever flow you need.
Kane
User | Count |
---|---|
19 | |
15 | |
14 | |
9 | |
8 |