Now I want to check in status column… whether all status is “Contract ended” or not. If all are contract ended I will take further action …but how can I check that…
I use for each row activity .inside that I used if condition
Use Filter Datatable to remove everything that is “Contract Ended” - then if any rows are left you’ll know some aren’t “Contract Ended” and can loop through just those.
Pls don’t add any logic in the if condition inside for each row loop. Instead just use one assign activity in then section and else use one assign activity.
If your condition
Create string variable ContractEndedFlag
Then → ContractEndedFlag = “YES”
Else → ContractEndedFlag = “No”
And add break condition also in the else part to make sure other than contract ended status we have to come out of the loop
For each row loop will check for all the status whether contract ended or not.
Now use one if condition outside of for each row loop
If condition would be ContractEndedFlag = “YES”
Then → it means that all the stauses are contract ended do your operations accordingly
Else → your business exception whatever related to co tract not ended.
Sorry I am not able to share screenshot since sending message from my mobile. I hope you understood my suggestion. Please try to follow the steps and let us know. Thanks.
Keep your condition for your if condition in inside for each row loop
And follow my suggestion in the inside of the consdition and add one more if in the outside for each loop to understand whether we got all contract ended or not
you almost done. use the below condition in the if condition inside for each loop
row(“Status”).tostring.Equals(“Contract Ended”)
Now the flow having capability tell us if the rows having only Contract Ended it will throw Yes after the loop so out side if condition you can have the subsequent flows.