Start Free Trial

Alteryx Designer Desktop Discussions

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

Workflow to load files - how to handle the problem of no files to load

cmcclellan
14 - Magnetar

I want to process one file in a folder, so I do this:

 

 
 

2024-05-22 08_26_22-192.168.88.18 - Remote Desktop Connection.png

 

 But I also want to NICELY stop the workflow if there's no files to process.  At the moment I'm using a Count Records > Filter > Message (as an error), but is there a "nicer" way to stop the workflow when there's no files to process (ie without generating an error) ??

12 REPLIES 12
cmcclellan
14 - Magnetar

No, I've never found a viable solution, and no answer from @JoshuaB  either 😉

caltang
17 - Castor
17 - Castor

Hi @cmcclellan !

 

Re-reading this post and my old reply. I have been playing with Detour tools a lot and thought about this:

 

image.png

 

image.png

 

The idea is to have the bulk of your process in the batch macro and have the detour tool do the heavy lifting. If there is a record, process as usual and then archive.

 

If no record, then the Count Records returns 0, and you can make a formula tool that is called "Status" or whatever, to flag true/false, which then feeds into the batch side. It will then control the action tool to update the Detour tool, and executes if there is >0 records, and DOES not execute (without error!) if =0 records.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
WirkKarl
8 - Asteroid

Hey! Another approach I use is a Block Until Done + Conditional tool combo. It lets the workflow exit cleanly if there’s nothing to process, avoiding unnecessary error messages.

Labels
Top Solution Authors