My flow triggers when an existing item is modified. At the end of the flow, I need to update the item with the approval status but the problem is it triggers and runs the flow again. How do I stop this loop?
We could add a condition ( Add a condition to a flow ) first after the trigger.
I think the Approval status should be only updated once the Approval Email has been sent, so actually the Approval status of the created SharePoint list should be no value or Not Approved, right?
After the When an existing item is modified trigger, add a condition, to check the Approval status, if it "equal to" Approved, then do noting, otherwise, following your flow action.
Would this work for your scenario?
If not, then please share more details about your Flow steps, and the corresponding SharePoint data sample that you work with.
We will offer another suggestion based on the information.
Staff submits a new absence request (ID#30 05/01/2017-05/01/2017), this request goes through the flow (new item is created), manager approves it, flow updates the [status] column with 'Approved', flow ends.
Staff changes mind and update the absence request (ID#30 05/01/2017 - 05/02/2017) which triggers the flow (existing item is modified), any time the dates are changed, it has to go through another approval process.
If on first request, manager rejects it due to staffing (i.e. too many people are already out on the requested dates), if a spot opens up (i.e. someone cancels their approved vacation), the staff can resubmit the same request for the open spot. They need to submit the same request to show when it was originally requested. For example, if 1 spot is open for 05/01/2017 and 2 people want to take 05/01/2017 off, then manager approves the person who requested it first originally
The table below indicates what action should be taken based on the status (Approved/Pre-approved, Not Approved, Pending) and reason for modifying the absence request (Cancel, Change, Resubmit):
(Edit: Sorry, the column header was not copied)
STATUS | CANCEL | CHANGE | RESUBMIT/NO CHANGES
|Not Approved||Do nothing|
I will try your suggestion, i think it will work and post the data samples later. Thanks Michael.
This is farcical.
It is obvious that you would want to be able to update a satus or other field on the item that triggered the Flow without triggering the Flow again.
It is obvious enough otherwise SP Designer workflow wouldn't have been able to do it, but it can and does: The "Set Field in Current item" workflow action.
Why can't Microsoft even learn from the successful parts of their own prior products when they implement a new one? Why does the MS Agile / Scrum mess have to re-invent the wheel and ask for functionality again every time when the functionality has been asked for and delivered in the previous product?
Agreed. Everytime I am about to start using Flow, I have to revert to SharePoint Designer workflows due to incomplete/poor functionality.
Check out the new Process Advisor community forum board!
Check out new user group experience and if you are a leader please create your group
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.