Alteryx Designer Desktop Discussions

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

Branching on Filter tool

Ekta
8 - Asteroid

Dear All, 

 

I have multiple branches in the workflow after the filter tool,

After each run, data will be flowing only to one branch and later there is a common workflow for all.

means - 

Alteryx workflow -> Filter-> workflow1 -> Alteryx workflow.

 

Please help, how can i configure this-

 

Alteryx workflow -> Filter -> workflow branch 1

                                              workflow branch 2        -> Alteryx workflow

                                               workflow branch 3

 

 

TIA

 

 

 

 

 

6 REPLIES 6
clmc9601
13 - Pulsar
13 - Pulsar

Hi @Ekta,

If you have different branches for the data in the middle section but want to bring it all together afterward, I would recommend using a union tool after the branches. You can change the settings to allow only the columns that the three branches have in common or output all fields. The union tool will work even if two of the three branches have no data flowing through them. Hope this helps!

Ekta
8 - Asteroid

Thank a lot for the reply, 

 

The incoming data could be dynamic means during my first run , i will have additional columns for branch 1 but during my second run i wont be having those columns and at this point my second branch will run .

 

but since this time we dont have 1st branch data/columns,, its giving me error (missing so and so column) and thus not getting any output from my Union output anchor.

 

basically, the input data in each run will be changing and based on the Filter tool - data will flow to either branch 1 or branch 2.

 

please help me with this

 

TIA

 

 

clmc9601
13 - Pulsar
13 - Pulsar

Do you have more concrete examples of your data (sample data files, screenshots of workflow, screenshots of error messages, etc)? I'm finding it difficult to understand exactly what you're trying to accomplish and what the problem is. 

 

I'm surprised the union is giving you an error since I think the default is to give a warning. You might be able to change the settings to warn or ignore when columns are missing, or output all fields anyway. 

 

I see in your example you use the word "workflow" several different times. Is this all within the same workflow, or is it several sequential yxmd files?

Ekta
8 - Asteroid

Ekta_0-1611306252573.png

@clmc9601  Thanks a lot for the reply,

This is my sample workflow- based on the filter tool the data will flow to any one branch- but since above branch have error due to missing column , its not going through Union.

Please help me with this.

 

TIA

 

 

afv2688
16 - Nebula
16 - Nebula

Hello @Ekta,

 

I have recently solved a similar issue to another user. Check out this post:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Enabling-Disabling-Containers-based-on...

 

If you need some clarification let me know 🙂

 

Regards

clmc9601
13 - Pulsar
13 - Pulsar

Hi @Ekta,

 

The above idea about a batch macro could help, but if you place the same formula inside it, it will still error when missing a column. Alternately, here are three more suggestions:

 

- Rather than using a regular formula which is dependent on column names, use a multi-field formula to reference "current field" dynamically. Also it looks like at least the first couple cells in your formula are all doing the same thing (replacing a character) so multi-field formula would be more dynamic anyway. Just be sure you select "dynamic or unknown fields" at the bottom of the list of fields to apply to. This might be the best solution depending on the full contents of your formula tool. 

 

- Transpose your data so that [A], [B], [C], are all in the Name column and the values which you are fixing are in the Value column. Then you will only need a single formula tool and there will always be a name column. If your key columns will be changing too, this could be tricky. But it could partially be fixed with the next solution.

 

- Use a dynamic rename at the beginning of your container to name the columns positionally 1, 2, 3, 4, etc. More specifically, use a text input tool to input 1, 2, 3, 4, etc through all the possible number of columns. Then set the dynamic rename tool to take names from right input rows and assign them positionally (be sure to select "dynamic or unknown fields" too if relevant). Then the column names will always be sequential. Formula will still struggle if you have different numbers of fields though. But, if your key columns are always in 1 and 2, this will help transpose. 

 

If these suggestions are still insufficient, could you share the full configuration of your formula tool?

Labels