Alteryx Designer Desktop Discussions

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

Dynamic Input: Ignoring error and continue process when file does not eixst

AdamTX
5 - Atom

I have a workflow which takes input from the users runs through a formula and into a Dynamic Input tool to pull in files.  Sometimes 1 of those files do not exist and the Dynamic Input file will error and the workflow will stop.  I need the workflow to continue.  I searched many issues in the community pages but the issues I've found are not the same.  Since I am providing the Dynamic Input with the full path to a file which doesn't exist, it just errors and doesn't try to open default template file.  Easy way to reproduce would be to have a formula tool create a full path to a file which does not exist feed a Dynamic Input tool with a good template.

 

AdamTX_0-1580502119413.png

6 REPLIES 6
Greg_Murray
12 - Quasar

@AdamTX,

 

What's the desired output from the dynamic input tool if the file path is bad? I think you can get around the issue you are describing with a batch macro, but I'd have to know more about what you'd expect it to do.

AdamTX
5 - Atom

If file path is bad, I don't want a failure to trigger and just pass no data - maybe load a blank template file is needed and finish processing.  I don't even need a warning message telling me the file wasn't there.  I can tell if data is missing.

danilang
19 - Altair
19 - Altair

Hi @AdamTX 

 

You can use a variation on this technique.  

 

w.png

User List contains the list of files.  The directory tool reads the list of files from path the user has entered or a fixed path, if it's always the same.  Join both on full path.  Only the existing files will be passed on the dynamic input tool so it won't error on non-existant files  

 

Dan

 

AdamTX
5 - Atom

Awesome, this gave me the idea I needed which appears to be working.  I am reading in all files with a directory tool and doing a check against the file I want to open.  If it isn't there; no location is being passed to the dynamic input and if nothing is there it will open a blank template file with no error.  Simple enough and sad I didn't think of it but greatly appreciate your help.

 

AdamTX_0-1580837247461.png

Akshu2020
7 - Meteor

Can you please share the workflow if you have it handy?

justinihil
7 - Meteor

Hi @danilang 

 

How can I create a version of this where the Text Input is a list of sheets in an Excel file and the Directory Input is the Excel file itself?

 

What I have is an Excel file that constantly changes the available sheets depending if there is data or not. So if a certain sheet does not exist, my workflow results in an error.

Labels