Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Dynamic Input With Condition

sanketkatoch05
8 - Asteroid

Hi,

I have been working on a workflow that has 5 inputs. The first 4 inputs are standard inputs and will be used in all scenarios but the last input cannot be used in some cases. I want this input to run on a condition. 

Condition: I have also used a Count Records tool to form the condition, that is, if the value in Count Records tool is 5 then only run the 5th input file else run the first 4 inputs only. 

 

Now, I'm stuck on how do I connect this condition with the (dynamic) input. 

 

 

11 REPLIES 11
jrgo
14 - Magnetar

@sanketkatoch05 

 

Here's a packaged workflow that contains the workflow, batch macro and one of the "week" files.

 

I stripped out everything from your original workflow except for the part that reads in the Week 5 data and replaced the Dynamic Input tool with the macro. Image below describes how to set up the connections. 

 

jrgo_0-1619102620895.png

 

The Macro itself is pretty simple. The Action tool could have been configured to have a hardcoded "5" in the formula, but figured it may be better to add a Text Box to allow you to specify what value it should look for so that this could be used for other use cases.

 

When the condition is met, the Action tool updates the Detour tool to go Left, which enables the Dynamic Input tool. When it's not, data goes to the Right which samples 0 records and creates the arbitrary "_Condition_Not_Met_" field.

jrgo_1-1619102793555.png

Hope this helps!


Jimmy
Teknion Data Solutions

sanketkatoch
5 - Atom

Hi, 

 

This is what I was looking for. I cannot express how satisfied I am with this solution, thank you so so much! 

Labels