I have an Alteryx workflow which should run only if count of records is greater than 0. If there are no records then the workflow shouldn't run.
The workflow is like below :
Solved! Go to Solution.
@Ankita_ankita -- i like to use the Test Tool and set it up to fail the workflow if no records come through. see attached example
Hi Daniel,
This doesn't work in my case. The test sheet still got overwritten. See workflow below :
Hi @Ankita_ankita,
If you click on the canvas and go to runtime settings and activate the "Cancel Running Workflow On Error" box it should stop the file from outputting.
You can see here that without the option ticked the records are written out:
But with the option ticked nothing is written out:
Your current configuration should work as long as you turn this setting on.
@DanielG's example will work(most of the time) but you need to have your workflow config set to Cancel running Workflow on Error, which was missing from TestExample.yxmd
A more generic way, or one to use when you want the workflow to complete even if some of the outputs are empty, is use a formula tool to create a path and use this path in the Output Tool
Since there are no records going into the Output tool, there is no FilePath field for it to use. The end result is the target file does not get changed.
Dan
@danilang - darn it. I am better than that. I forgot the most important aspect of it. Thanks for catching it. haha. Have a great day
I have done the configuration also but its still overwriting the file at the end with 0 records whihc I want to stop .
Please suggest.
@Suppu - Can you add a block until done that connects first to a test tool. If record count is 0 you can have the workflow "fail" and stop before it gets to the 2nd path out of the block until done which would be the output.
@DanielG
Please see the attached image of my workflow and suggest . Here the Test_OP file still gets overwritten.
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |