I want to process one file in a folder, so I do this:
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) ??
Hello @cmcclellan ! You can consider this: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Detour-when-no-records-are-pre...
Worked for my use case, similar to yours.
Hi @caltang
Which bit worked though? I'd already written a workflow similar .... use a Count Records and a filter ... but there's no records to count, so there isn't a value to filter on.
I guess I don't understand how a Detour would work here, because it's a selective detour based on the presence of records ... or not.
Something like this?
Let me clarify, are you looking to stop the workflow immediately at the input stage if there's no file?
EDIT: I just realized I pasted the wrong link, this is the one: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/How-to-by-pass-part-of-workflo... - my bad!
Okay I re-read your statement and you're looking to stop it without an error... usually cancelling it WITH error is the way to go to my understanding. Re: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Sequenced-Containers-Macro-how...
But I'm interested to know how to stop it without error as well now.
That's it :) .... it's easy to stop the workflow with an error, but I want to stop the workflow without errors, but not process the majority of the workflow when there's no file to process.
It sounds simple, it's harder in reality.
Hi @cmcclellan,
I'm assuming you're reading in the file with a Dynamic Input after getting the FullPath if a file exists? If so, here's a solution.
There are four steps:
That still doesn't work .... I've attached my workflow to show what I'm doing.
I'm using this:
The folder structure is:
c:\testing
c:\testing\archive
The CSV file is in c:\testing
The first run of the workflow, everything is fine and the CSV file is moved to the archive folder
BUT on the second run (when there isn't a file in c:\testing) I'm trying to make the workflow run without an error at all, but also NOT run through the Dynamic Input tool
Hey @JoshuaB after our chat last week, I found the thread ... I just didn't realise I posted it in May :)
Can you have a look and see if you can find a solution?
I hope you enjoyed your time in Australia :)