I have 3 SharePoint lists, as follow:-
1) Posting Process with Status ; Open, Closed
2) Posting Forms with Status; New, Work Order Created & Done
3) Posting Relation; PostingProcessID & PostingFormsID
Now i am writing the following workflow which run on schedule bases, and it do the following:-
1) Get all the Posting Processes which have their status as Open
2) Get all the related PostingRelation
3) Get all the Posting Forms >> loop through each form and check its status >> if its status = New or Work Order Created >> set a variable named hasOpenPostingForm = true
4) after the first loop iteration ends (Posting Process ApplytoEach) >> check the hasOpenPostingForm variable if it is set to false >> if so, send an email that all the Posting Forms has been completed >> and set the Posting Process status to Closed. and so on...
now i want to make this more efficient >> mainly to skip the Loop once the hasOpenPostingForm is set to true, as to us if the process still has one open form or 100 open forms it is the same.. so no need to continue processing the current iteration if this variable is set to true.
seems in power automate we can not skip ApplyToEach.. so will DoUntil help us in this case?
Thanks