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.
Thank you.
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 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
I'm on Version 2024.1 if that helps as well
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:
Then set the control parameter to overwrite the file path value in a standard data input tool.
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