cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tamras
Kudo Kingpin
Kudo Kingpin

SharePoint Update Item loop?

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?

 

2017-04-14_1037.png

 

 

 

 

4 REPLIES 4
v-micsh-msft
Community Support
Community Support

Hi @Tamras,

 

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.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-micsh-msft

 

Scenario# 1:

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.

 

Scenario# 2:
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

Approved/Pre-Approved
  • Email manager to cancel
  • delete calendar event
  • update list
  • Send approval email
  • if approved; update calendar and list
Do nothing
Not ApprovedDo nothing
  • Send approval email
  • if approved; update calendar and list
  • Send approval email
  • if approved; update calendar and list
Pending
  • Send email to manager
  • delete SP item
  • Send approval email
  • if approved; create calendar event and update list
  • Send approval email
  • if approved; create calendar event and update list

 

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.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (3,360)