We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Conditional Input (Control Container ? )

MKAR
6 - Meteoroid

Hi all,

 

i would like to use different input files (Excel files that differ a bit and require a little different processing, some files might be .xlsx some might be .xlsm) for a workflow, which after data preparation is the same. 

 

my idea would be to identify which kind of input format im getting (4 different versions are possible) and depending on the identified input variant the corresponding data preparation and input tools shall be selected.

 

i tried to use control containers but that doesnt seem to work, since it gives "anchor problems" (says, the anchor was no closed). Idea was, that the controls container should be selected depending on the identified Excel File format. 

 

Is there a way to get around the "anchor not closed" issue, or are the better ways to implement this ?

 

right now i have to activate/deactive the containers manually depending on the input file format that i identified. 

17 REPLIES 17
Gaurav_Dhama_
12 - Quasar

Even if it is control containers, input tool will need the sheet name, which is not fixed, so there again you will have the same problem.

Did you have any alternative thoughts how you would have read the data from excel, lets say if control containers worked.

MKAR
6 - Meteoroid

Yeah, i was thinking that if control containers would work, i could just use some filter tools inbetween the container connections and have the specific container activated depending on which filter route would activate a container.

 

e.g.: Input from the cover sheet says its Version A, then the Filter Tool would only pass on Data to Container "A" and thus activate Container "A" whilest Container B,C and D stay deactivated. 

Gaurav_Dhama_
12 - Quasar

But how will you decide the sheet that Container A has to pick? and same for the remaining Containers.

MKAR
6 - Meteoroid

Something like, if the file name contains ".xlsm" then it shall be the Variant "A", if a certain Value exists in the first Sheet than it shall be Variant "B", etc.

I guess sheet names might be consistent, now that i think about it more

Gaurav_Dhama_
12 - Quasar

Correct, if the sheet names are consistent then that workflow which I initially shared will work. But out of curiosity if you want to do it with control container, then see the snip below, this is how you can use it.

Gaurav_Dhama__0-1754388740043.png

 

If you want to read the file dynamically, read the files using dynamic input tool, see snip below.

Gaurav_Dhama__1-1754388898337.png

 

Now how do you use this data is for you to figure out, note that you cannot use detour end with control containers.

MKAR
6 - Meteoroid

The Workflow which is in your first screenshot pretty much follows the schematics that i use on my workflow, but that gives the Error "Error: Steuerelement-Container (1616): Internal Error - Anchor (16:Log) was not closed"

Gaurav_Dhama_
12 - Quasar

That could be because these control containers are meant to control the flow of the data, rather than the preventing the container from running at all. If you use it to prevent the container from running at all, it may fail, or some other tools might give errors, for example detour end just don't work at all with control container. 

MKAR
6 - Meteoroid

hmm ok, unlucky i guess.

 

Thanks for your help so far, ill try to make the dynamic input solution work, but seems to require a bit more of getting to understand it :)

Labels
Top Solution Authors