Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

File availability check with Python and Read data based on the output

harish_alt
6 - Meteoroid

I used Python tool to check if a file is available or not and it gives True/False as output. If the output is true, I would like proceed with the reading the same file and if it is false, the workflow should stop with a message. Can you please help?

Thanks is advance

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @harish_alt 

 

You can use the Message tool found on the Developer palette.  Connect it to the output of your Python tool and add an "if false" condition.  Set the tool configuration to Error and Stop passing records through this tool.  

 

Dan

messi007
15 - Aurora
15 - Aurora

@harish_alt,

 

Please see below how you can it:

 

Add a filter in order to check if true or false

If true then prepare the path and then use dynamic read to read the file from the path

If False then display the message using a message tool and stop the workflow form the configuration panel:

 

messi007_0-1617969078988.png

Below how to stop the WF in case of error

 

messi007_1-1617969122688.png

Attached the workflow,

 

Hope this helps!

Regards

Labels