Hi all!
My test tool is not working when reading and empty column.
I need that the workflow stops once faces the condition of empty values, printscreens are attached.
Need help, thank you very much!!
Solved! Go to Solution.
Is the “Cancel Running Workflows on Error” checked On under your workflow’s Runtime settings?
Also if it’s not even erroring, you may consider putting a Count Records tool and simply making the test [Count]=0
Hi @alexnajm ! Thanks for the reply.
Yep, the flag is checked under Runtime settings.
I tried but the count record tool erases all the previous data, I actually need the data because the number of lines is dinamic everytime I run the workflow.
I am really trying to find a workaround for it. Just tried creating a formula like : "IF IsEmpty([RecordID]) THEN Null() Else [RecordID] EndIF"
and then on test tool: "!IsNull([RecordID])" also tried "!sNull([RecordID])"
Neither worked.. I have no clue why this is not working
The Count Records would go right before the Test tool in my opinion! Not before the Block Until Done
I am pretty sure the problem is if you have zero records going into that Test tool, no formula will work since there are no values to calculate any sort of formula
It could be, depending on if you have AMP Engine turned on. I find block until done tools can sometimes be moot when running AMP engine workflows - I’d use control containers to be safer.
I see! Mind sharing an example? Thanks again @alexnajm
Hi @Joker_Hazard,
By looking at your Designer UI, it is likely a pre-22.1 version, where using Control Containers (supported in 23.1 and above) is not possible. While it is easier to achieve the desired result using Control Containers, it is only a matter of replacing the Test tool with a Message tool and adding a few more tools to achieve the necessary structure.
As the Test tool default configuration is set to "Don't report errors if there are other errors in the workflow" (until a specific version, might be Designer 23.1 but not sure), you will have to disable them for each Test tool you place on the canvas, or alternatively you can modify the workflow XML:
Replace this:
<DontReportSubsequent value="True" />
With this:
<DontReportSubsequent value="False" />
For the solution I am sharing however, you won't be placing Test tools and you will not need to enable the Runtime setting "Cancel Running Workflow on Error", as the Message tool will stop the workflow instead (and that option is most reliable when there is a single branch going on, or the record count of the previous branches are always appended to the next branches as a control, as you will notice in the sample workflow I am going to share).
By looking at the screenshots you shared, I noticed that there are multiple Test tools with multiple Block Until Done tools that would perform the checks.
What you will need to do instead is replace the Test tools with Count Records + Message + Append + Dynamic Select tools to achieve the desired result, where the workflow would stop processing records if there were no more incoming rows (and there are no other separate processes in your workflow other than the branched structure, though even if there were separate processes they would still need to be appended to this structure to be able to properly stop them).
I am sharing a sample workflow of how you could change the workflow structure, please let me know after trying it if this was what you wanted to achieve.