I am working on a workflow which has specific condition:
1. Once user submits the form it should compare if user; specific type for current year is already approved. If yes then email will notify and workflow will end.
2. If status is not approved then workflow with generate a task for approver.
So far: I have tried "RunIf" but it looks like it is comparing only for when above condition is meeting at first instance. It is not looping through to compare all items of the list.
example - name = rahul; type = abc; year =2017 where status = approved is already a list item. When I am creating new item with same value it is working as expected and I am getting email notification and WF is terminated.
Now I have another item -- name = rahul; type = xyz; year =2017 where status = approved in my list. I am again creating item with same value my workflow is not executing steps mentioned in RunIf but going out from that and creating new Task for approver.
I have tried "RunIf"; "Condition Branch" and "Loop with Condition" but no luck.
Is there any other way to achieve this functionality. Let me if anyone needs more clarity.
I am using Nintex Form and Workflow o365.
Solved! Go to Solution.
I am trying to compare records in my list where if Status=Approved for any of existing record with name = rahul and type = xyz my workflow should send a message and terminate otherwise go ahead and assign task.
I am trying to figure it out a way to compare records. I am not clear if querying a list would help because again I have to compare. Is there anything I am missing in your solution ?
So if you query the list based on your criteria
and store the results in a collection, you can use the Collection Operation action to perform a Count and store the result of that collection in a variable
Then use the "Set a Condition" action to see if this variable has a value greater than 0, and this will determine whether you've returned any results in your query. If results returned in your query then you have a match.
Thank you very much for spending time and providing your thoughts. I have found a way to compare old record within the list in a different way.
Instead of comparing multiple columns based on another column, I have clubbed all the columns i.e. Name, Year and Type into one column in workflow. Now I am comparing this value with previous value where condition Status = approved. I am doing this comparison in "RunIf" action and getting desired result.
Thanks again !