cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Event Firing when Flow updates a SharePoint list item

Add a feature that will allow flow to disable event firing when updating a SharePoint list item, so that the Flow doesn't get stuck in a loop. Currently if I create a flow with a SharePoint list trigger when item is created or modified and have the Flow update a field in the item the loop gets stuck in a loop. One workaround is to add logic to check if the field(s) still need to be updated and if not then don't update the item but even in that case the flow will be triggered twice. It just makes sense to have an option that will allow Flow to update an item without triggering an event that will cause the same Flow or another Flow to run against the item again.

Status: Declined

Hi all,

 

After thoroughly reviewing this idea, we have decided not to proceed with this idea for a couple of reasons.

  • SharePoint events are no longer event receiver based and are performed using webhooks or polling where applicable
  • Other Office 365 applications and internal systems like auditing may and will rely on such changes like updates to items, files and other entities in SharePoint

However, that said, we understand the crux of the issue which is to help avoid loops. We will work with the flow team to come up with a generic model/pattern that applies across data source/connections for similar scenarios.

 

Thanks all for your input and please submit/vote your ideas as we are actively monitoring the ideas forum.

 

Thanks,

Chaks

Comments
Level: Powered On

@normmsnpoweruse I created a "RunFlow" column, if the field is equal to "Yes" the flow sets the column to "No" and does the rest of the app logic inside of the true section of the conditional statement. When a user submits a powerapp form, the submit button patches into the list and changes the "RunFlow" column to "Yes"

 

It will run a second time, but since the flow doesn't update the item in the empty false section of the conditional statement, it wont trigger a third flow.

 

Annoying that I'm burning through twice my flow run limit, but I couldn't think of another workaround.

 

EDIT: looks like this is also the solution that @Audrie-MSFT linked to earlier in this thread: https://melihubb.com/2019/04/20/the-infinite-loop-what-it-is-and-how-to-avoid-it/

Level 8

@normmsnpoweruse  - My solution was similar to @pcopeland . I'd have to burn up two flows.

Level: Powered On

Unfortunately most of our flows go through at least 5 approval steps, which means

 

5x2=10 flow runs per item. 

4,500 monthly flow limit for Plan1/10 flow runs= 450 max items can be created a month..

Level: Powered On

I decided to post a solution which does not cause re-triggering, but it involves using XML and knowledge of the SharePoint API's.

 

You can read about over at https://www.techmikael.com/2019/04/disable-event-firing-when-flow-updates.html.

 

The challenge is that any update in SharePoint causes an event (webhook) to trigger, except what SharePoint calls a SystemUpdate. This API is not available in REST, but can be still be called via the "old" API endpoints using XML. So until the SP connectors support SystemUpdate, or something else is implemented in the backend, this is what you have to resort to Smiley Happy

Level: Powered On

@Mikael_Svenson,

 

Thanks for posting your solution. It is just weird that MS is ignoring this important problem for more than a year now.

>