Workflow step skipped in k2 as query fetched zero rows

  • 5 September 2022
  • 1 reply

We have workflow where the query fetched the center names. In my case, no center was fetched using the query means no rows. and instead of getting into error, the step is skipped and workflow got approved.


Kindly let me know for such situation, how to avoid step to get proceed.



1 reply

Userlevel 3
Badge +9

You can use a Split decision step:


Call the SmartObject and store the Centre Name in a workflow variable before you get to the Split step, add two Paths to it: Valid and Invalid choose the Custom Logic option.   


Then in the Split rule check to see if the variable is empty, if it is then follow the invalid path and add some handling around this (you might want to email a developer or some such), else follow the valid path and process as normal.