Alteryx Designer Desktop Discussions

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

code branching based on Filter Tool input

lostipod12
6 - Meteoroid

Hello, 

Setup: I have a Workflow which will receive files where columns aren't always the same. Sometimes they come from the Accountancy dept., sometimes they come from the Finance dept.

 

I am aware of which department they come from by the file name, they will read something like ACCT_REPORT_MAY_2022.xlsx, or FIN_REPORT_MAY_2022.xlsx

 

Depending on what department they came from, I wish to do different things to the data in the files. 

 

I started using the Filter Tool to check for ACCT or FIN in the FileName field generated by the Input Tool. This does well to branch the data down one path or the other, but it always hangs up on an error, because the FALSE side of the Filter Tool tries to execute on fields which don't exist. In the visuals below, you can see that the Filter Tool in the bottom branch gives me an error, and the Parse Tool in the top branch gives me an error.

 

 

Here is a visual of what I'm trying to achieve:

 

1. When FileName Contains "ACCT", then do the steps on the top of this branch and completely ignore the steps at the bottom of the branch.

lostipod12_1-1651537945026.png

 


2 When FileName Contains "FIN", then do the steps on the bottom of this branch and completely ignore the steps at the top of the branch.

lostipod12_3-1651538062973.png

 

I have a feeling that the Filter Tool will not work for me. Is there another tool which allows for data-driven code branching? 

 

Thank you,

 

Nick

1 REPLY 1
Labels