In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

What to do when file doesn;t exits in folder

sbatra116
8 - Asteroid

background: 

folder with 100's of csv files. my workflow will pick the file name sthat starts with "Phone*.csv"

can be any number of files.

 

process:

I'm using directory tool to reach the file like this

directory name: 

file type: Phone*.csv

 

Issue:

process works fine when files exits. but when NO file exists i get blank records but my process fails because i'm expecting file and data.

how to handle this. 

 

when No files exits i get this blank 

 

sbatra116_0-1687455098701.png

 

Process:

if file exists -- Good

If it doesn;t then stop the worflow. -- I'm having isues here 

 

 

 

3 REPLIES 3
ChrisTX
16 - Nebula
16 - Nebula

See this example from @danilang  about using a Message tool to generate an error, and setting the workflow configuration option to stop on error.

 

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Sequenced-Containers-Macro-how...

 

geraldo
13 - Pulsar

@sbatra116 

 

Um exemplo de fluxo de trabalho

Gaurav_Dhama_
9 - Comet

You can end the flow by adding a Count Records then filter for 0 count and attach a message tool to it. If this tool runs that means there is no data and you get a error "which you can define yourself". (Dummy flow for reference)

 

You can then stop the process by selecting "Cancel Running Workflow on Error" under Workflow - Configuration > Runtime. (Screenshot below)

 

Cancel Running Workflow on Error.png

 

 

 

 

Labels
Top Solution Authors