Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

URGENT How to handle False filter tool condition

alt_tush
9 - Comet

Hi,

I have a path where one file is saved.

Using directory tool I pass the full path to Dynamic Input tool to read all the data from excel file.

It works perfectly fine if there is a file in folder.

But it won't work if folder is empty. It gave me an error.

I want to add a logic in such a way that if file is not exists in folder then Dynamic tool should not be run. Dynamic tool only run when file exist.

It would be great if you can assist me.

As I am stuck in between.

 

Attached email for your reference.

 

Please note I want to use directory tool only to pass the path. Also I don't want to stop the process if file not found using error tool.

 

Thank you in advance.

 

10 REPLIES 10
RolandSchubert
16 - Nebula
16 - Nebula

Hi @alt_tush ,

 

I think, the solution @danilang presented in this post could be helpful:

Stop Workflow 

 

 

Best,

 

Roland

Maskell_Rascal
13 - Pulsar

Can you provide how you have your Dynamic Input Tool configured? 

alt_tush
9 - Comet

Hi RolandSchubert,

 

Thank you for response,

 

I have seen the solution which you have provided but I don't want to stop or cancel the workflow.

 

It should be work true and false basis

If file exists then dynamic input should work if false the only process my false side further logic,

 

Thank you

 

alt_tush
9 - Comet

Hi,

 

Thank you for response.

 

I have configured dynamic tool like

 

1. Select the option button - Read a list of Data Sources

2. Field Dropdown select the -> FullPath from directory (It works if file found other wise gives an error.)

3. Action -> Change Entire File Path

 

Thank you,

Waiting for your reply 🙂

 

 

RolandSchubert
16 - Nebula
16 - Nebula

I see. What about using a Count Records tool to count the number of files, append the count to all records and use a Filter tool to process Dynamic Input only, if count (=> number of files) is > 0.

 

 15-04-_2020_15-58-45.png

alt_tush
9 - Comet

Hi,

 

Thanks for reply. It doesn't work for me it is giving an error because even after count is zero it processed through this dynamic input tool and it gives me error saying file not found,

 

Once again thank you 🙂

Maskell_Rascal
13 - Pulsar

Here is a slightly modified solution from the one @RolandSchubert provided. The problem with using the append tool is that it will only append if data exists. That means you are still getting the error on the Dynamic Input. I'm using a Blocking Test macro from CReW Macros to stop all downstream tools if no file exists. I've attached a workflow for you to try out. If you remove the file "My Data File" from the "Data" folder, the workflow should stop processing the downstream tools. 

 

Maskell_Rascal_0-1586961220079.png

 

alt_tush
9 - Comet

Hi,

 

Thank you for your help.

Need your help on CReW macro. How should I add CreW macro on Alteryx.

I am using Alteryx 2019.

 

Maskell_Rascal
13 - Pulsar

You can find and download the CReW Macros package from this website: http://www.chaosreignswithin.com/p/macros.html

They have a bunch of other useful macros as well and great help tutorials!

Labels
Top Solution Authors