Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Input Data - resume on error

lwingebach
6 - Meteoroid

I have an App where a file path is being populated in a Text Box, and the value updates an Input Data tool.  Sometimes though, the file is empty (or the file doesn't yet exist).  If this occurs, I would like the workflow to use a default file (which is the filepath I have hardcoded in the Input Tool).  Is there any way to get the workflow to continue on with the hardcoded value in the Input Tool if the file that is populated in the Text Box errors out?  Basically, I'm looking for:  On error, resume with default file instead.

Thanks in advance!

4 REPLIES 4
HomesickSurfer
12 - Quasar

Hi @lwingebach 

 

Here's my approach that uses two Input Data tools, one for your default file, the other for the optional file - using a File Browse to ensure existence of the file and to select applicable sheet (if .xls*).  App and workbooks attached.  Place in C:\temp\Input Data - resume on error to test.

 

WorkflowWorkflowBrowse, select same file as Default (Book1)Browse, select same file as Default (Book1)Browse, select alternate file (Book2)Browse, select alternate file (Book2)Browse, select alternate file (Book3) without records...Browse, select alternate file (Book3) without records...

HomesickSurfer
12 - Quasar

Thx @atcodedog05 , I thought you'd like this! 💡

lwingebach
6 - Meteoroid

Hi @HomesickSurfer,

 

Thank you so much for the suggestion - the solution you offered is very clean, easily understood, and much appreciated!

The problem is, that instead of using a File Browse, I need to use a Text Box.  Without getting too much in the weeds on the upstream process, I have an RPA bot populating the Text Box based on a variable that is generated during the RPA process.  I can modify my RPA code to create a file or copy the default file if the regular file isn't available or is empty, but I was hoping to just modify the Alteryx workflow (which is generally less invasive and time consuming). 

So, that being said, I'm really looking for an approach where the workflow will not error out, but will resume another path, if the populated input file in the Text Box isn't there or is empty.  As of right now, the value hits the Input Data tool and errors stating "Error opening...no fields found".  Is there anything you can think of that I can do (not even sure if this is possible) between the 'Update Value' Action and the Input Data tool, before it gets to the Input Data tool?  Any ideas?

lwingebach_0-1635285571079.png

HomesickSurfer
12 - Quasar

Hi @lwingebach 

 

Revised attached app to accommodate use of the Text Box interface tool.

Works good.

Have to use the Directory tool feeding FullPath into the Dynamic Input tool.

2 Text Box tools are needed to input path and filename with extension.

 

Capture.PNG

Labels