Free Trial

Alteryx Designer Desktop Discussions

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

How to keep a dynamic input tool from erroring out if no file is present to read

JChiaravalle
5 - Atom

I am working on a project in which checks are issued and need to be brought into the workflow.  The issue is that checks are not issued every day, but my workflow is run every day - there are other parts.  If there are files, the workflow works great.  If there are no files for that day, then my dynamic input gives an error "CAN'T FIND THE FILE..."

 

I have the dynamic input tool after a filter, so it would seem that if the directory tool read in no files, then the dynamic input tool shouldn't run, but it always runs.

 

Does anyone have any ideas on how to prevent the dynamic input tool from looking for a file if the file is not in the directory?

 

I isolated the portion of the workflow and attached a snapshot of it below with the error.

Error with no files.JPG

 

Thank you. 

 

 

2 REPLIES 2
DavidSkaife
14 - Magnetar

Hi @JChiaravalle 

 

I've just done some testing using the built in examples and i think the error is because it cannot find the template, rather than the fact there is no file available from the directory:

 

Screenshot 2025-05-16 094615.png

Screenshot above shows no error and no files/records read

 

Screenshot below shows an error when i change the template name (to simulate it not existing), note the similar error to what you're getting

 

Screenshot 2025-05-16 095553.png

 

I'm on Version 2024.1 if that helps as well

 

 

Pilsner
12 - Quasar

Hello @JChiaravalle 

Another way around this issue would be to use a batch macro. If you feed the full paths from your directory tool, into the control parameter input of a batch macro:

Workflow.png

 

Then set the control parameter to overwrite the file path value in a standard data input tool. 


Macro.png


This should achieve the same result that your after, but any records that error will simply be skipped as its a batch macro.

I hope this is useful and all makes sense.

Regards - Pilsner

 

Labels
Top Solution Authors