Hi,
I'm working on a flow that every 4 hours screens a Sharepoint list to identify records in a given state "Received".
For any of such records, i expect the tool to gather information, prepare and send a record-specific email.
In case there is something wrong in the data preparation, i have embedded in the Apply to each bloc a parallel error line, resulting in an alert message and putting the record in a Warning state.
Often by the time i can solve the issue another run has passed (flow runs every 4 hours) and the non-Warning records were processed, which is fine.
However, when i resolve the initial issue and put the flow back to work, it often keep inside is Apply to each bloc the need to run on records that were already processed by other runs.
Would you have any idea how i can "empty" the flow memory and only process the Warning record after resolution ?
thanks in advance for the support
Hi @grantjenkins, my flow is designed to collect records from a Sharepoint List in a given state (here "Received"). Via the Record identifier, it goes then to 2 other lists to retrieve data associated to the Identifier.
All that data is then aggregated as a HTML table communicated to users in email. The email generated from a prepared template as part of the flow.
In order to prevent the sending of incorrect/empty emails to users, i have created a side path that would park the flow run if an issue is detected in the data aggregation. And here you spotted correctly that missing value or unreadable value can happen.
This is very minimal but it can happen as the data is either extracted using another flow reading pdf content and another one based on lookup blocks to retrieve data from local excel sources.
It's almost impossible to be 100% sure no error will happen so i need the park way to stay but i also need the to park only the error-prone record and not all the records that are concern by the initial Apply to each block.
Hope that's clear enough.
Hi @VictorIvanidze, ok i see what you mean. i'll investigate the "Do until" loop.
In my design, i first collect records from a SP list in a given status. Then i was applying the Apply to each loop as overnight i cannot predict exactly how many records will there be in the state when flow operates (flow has a time-activation every X hours).
so i need to create a the whole set of action i want the flow to apply on ONE given record and encapsulate this in a Do-Until loop to apply the set to ANY records fitting with the condition right ?
And if i get an error in one of the loop, it would go to my escape error flow while leaving the other loops independent and proceeding.
do i get it right ?
Thanks
Are you able to explain what error(s) you might get when running the flow? It might be better to mitigate the errors so they don't happen so each flow run executes without any issues.
It is because there are sometimes empty values in the data, etc.?
Sorry I feel I gave you enough info. I'll try to rephrase: to do what you want you have to use another type of cyclic operation that will allow you to exit the loop on any step. The only such thing in PA is the "Do until".
My suggestion: try to rewrite your flow to use the Do until.
Probably because i'm more familiar with the Apply to each block.
Now if you feel there has been enough gatekeeping in this conversation, we might get back to the initial question and maybe i can learn a new method to deal with my issue.
Thanks
The output of "Get received items" action is a JSON array.
Why do you think you are able to handle it using the "Apply to each" but unable to handle it using the "Do until" ?
Hi could you please elaborate ?
As my flow is intended to identify multiple records in the given state and then proceed them in sequence, i do not see how the Do Until cycle would be applicable here.
Thanks
Instead of the "Apply to each" use the "Do until" cycle.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1