There are two situations I'd like to explore within Alteryx.
Is there a way to move a workflow past through the dynamic input tool when it is the incorrect "File Format?" I know Alteryx will throw an error saying "unable to open file for read." For example, I'd like the file format to be set as xlsx but the incoming file is a csv. But I'd like the workflow to proceed with the intention of outputting a value on a separate output file saying something along the lines of "error: not excel file."
The next situation is when there is a missing file within a folder. Let's say this is a macro and I am feeding in a path into an input or dynamic tool, but the file is missing. I'd also like the workflow to proceed, but this time with the intention of outputting a value saying "error: missing file."
Solved! Go to Solution.
Hi @aizel,
I think something like this is what you are looking for. I am passing the file path to a simple batch macro that checks the extension. If the extension is xlsx, it brings in the data, if it's anything else, it outputs an error message.
Note: you will need to update the template file in the dynamic input inside the batch macro for your use case.
workflow
Batch Macro
Hope this helps,
Greg
I agree with @Greg_Murray - there's no way to do this just with the input tools or with workflow config (i.e. no option exists within Alteryx to say "if my file is in the wrong format - then change the format and don't throw an error or terminate the workflow")
But much safer is to use a directory tool to look for the files - and then either use a macro or a dynamic input (macros are more flexible) to read the data.