Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

RUN CONTAINER WORKFLOW ONLY IF INPUT FILE ISNT FOUND

andrebrandaobritob
6 - Meteoroid

Hello!

 

I have a workflow with two containers.

 

1 - The first container generates an output file to a dynamic file path and file name.

 

2 - the second container generates an output file based on a file with specific name/folder.

 

I`m struggling to only run the first container IF the output file isn't found (i dont want the flow to overwritte it, basically). I also want the second container workflow to run only if the input file is found.

 

I dont want error messages, if file isnt found, just ignore the flows. Is it possible? I've been looking everywhere and still can't make it work....sorry if the question already has been answered.

 

How can I achieve this?

8 REPLIES 8
flying008
15 - Aurora

Hi, @andrebrandaobritob 

 

Could you please tell me , what version are you using ?  If your version above v2023.1+, you can use Control Containers tool to execute the workflow as your want.

 

 

OTrieger
14 - Magnetar

@andrebrandaobritob 
If there is no data to output Alteryx does not generating an output, so if there is no input file even if the WF triggered Alteryx will not create an output. 

OTrieger
14 - Magnetar

In case that your version does not support Control Container you be able to do it with Detour tool.
You will need to add Count tool and then if equal zero the Detour will rout the data to a Message that says "The automation stopped as there is no file to process." or whatever message you want to use.

Actually the WF will not stop working but will produce this message and then stop.

If there will be a file then Count will be equal to 1 and then the data will be flow to the other route doing what it needs to do.

flying008
15 - Aurora

Hi, @OTrieger 

 

Could you please upload a sample workflow to explain as your said with use Detour tool ?

OTrieger
14 - Magnetar
 

bcm.PNG

This snippet should illustrate what you need to do.
But what it does, based on the count it will change the Detour rule if to flow to the right or to the left, and as you can see you have one flow that goes to the left and one to the right.

flying008
15 - Aurora

Hi, @OTrieger 

 

Thank you for your screenshots and explanation. This batch macro is the same as what I had imagined before, but I actually wanted to use the Detour tool without embedding the macro to achieve this effect. Thank you anyway!

OTrieger
14 - Magnetar

@flying008 
unfortunately I would not be able to do that, and that is the reason that I shared with you snippets of how to set up the tools.

flying008
15 - Aurora

Hi, @OTrieger 

 

That's okay, thanks for your help.

Labels
Top Solution Authors