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
Frequent Visitor

I was able to resolve this issue by using a compare action to see if the two columns I populate through the flow had correct data. It required setting up a couple variables before the compare action to create what the value should be and then validating that it exists in the desired column. If they both exist, I dump it to a terminate action with a cancelled status. The flow will run a maximum of two times. I still wish Flow would have a feature to run only once by itself, but the structure above works well and validates that accurate data is placed in each of the populated columns.

Regular Visitor

It is great idea by MS to run all flows in a couple of days... Really disappointing and shameful!

Even possible workarounds (setting up variables etc etc) would double the number of flows necessary, because we would anyway start a new one to verify the condition.

Regular Visitor

Yes please.  Having extra logic is tedious and it wastes my Flow runs.

 

Advocate I

It is already possible to stop subsequent runs of a Flow when updating an item within the Flow that also triggers on that item.

On the SharePoint created or updated item trigger you can put a condition statement that will be evaluated and if false will not run the Flow a second time. This means you will not get additional Flows being counted towards your quota. The only downside is you need to export your Flow and add the condition in the FLow json definition file and reimport. In LogicApps you can do this in the UI.

Advocate II

@dtjm I'm aware of the possibility to modify the trigger via json. Personally I try to avoid manual json edits as much as possible - same with xml. XML and JSON are data formats, not for humans to tinker with 😉

 

The solution would be to expose the trigger conditions in the connector UI itself.

When doing an update to a list item or document new flows may be triggered. Althouh this can be a requirement it would be nice if we could configure the update item trigger in such a way that updates would be automatically skipped if nothing is updated.

 

Imagine a list item with the Title 'Test'

 

If a list item update is run where the Title is set to 'Test' then no update needs to be made. 

If the Title is set to 'Test 123' then an update is made.

 

~It would probably be useful to implement this as a tickbox in the action settings So that any chnages in behaviour can be handled.

Kudo Kingpin

This is a definite must, especially in a model that now charges for Flow runs.  I find that usually I have about a 3 to 1 ratio  (3 flows run for ever 1 flow I REALLY wanted to run).

 

We organizationally do most flows as a service account, so I usually terminate the workflow if it is updated by a Service Account, and allow it to run if it was updated by a regular user.

Advocate IV

I found a work-around but it still results in the flow running twice.

 

Mine is an approval flow which captures the approver's response (Approve or Reject), the date of approval and the approver's comments in a SharePoint list. Of course, this updating of the list with the approver info results in the flow running twice because it's being modified by the flow itself. My work-around was to populate the "Approver Response" column (Where the words "Approve" or "Reject" will end up) with the word "Pending" by default. When the approval flow runs it checks for the word "Pending" and if it is there, the approval flow runs. When the flow runs the second time it checks for "Pending", doesn't find it and terminates.

 

 

 

 

 

 

 

 

Anonymous
Not applicable

I am running into the same issue but am wondering why the action of STOP FLOW wouldnt end that cycle? 

Advocate IV

The "stop flow" or "terminate flow" doesn't work becuase the flow is triggered "when an item is created or modified". As soon as an item is created or modified in the list the flow starts. You can't "stop" this action at the end of a flow.