cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PoKasia
Frequent Visitor

SharePoint List: Item Created Or Modified: Flow Runs Twice

Hi,

 

I've created a Flow that triggers 'When an item is created or modified'. The Flow checks the value of a field in the item, and depeding what it is, it then changes the value of another field.

When I run the Flow, it keeps triggering every minute. It seems to treat its own modification of the item as a trigger to start itself again. And again. I had to stop the Flow at one point.

This is surely a bug, right? If this is by design, then it renders this type of trigger completely useless. Or am I doing something wrong? I just want the Flow to trigger when a USER modifies the item. Please can anyone help?

 

Thanks!

5 REPLIES 5
Community Support
Community Support

Re: SharePoint List: Item Created Or Modified: Flow Runs Twice

Hi @PoKasia ,

 

Could you provide a full screenshot of the Flow configuration?

The trigger you are currently using will trigger Flow when a new item is created in the list or the existing item is changed.

 

If there is Update item or a Create item action in Flow, and the configured list is the same as the trigger, a loop will occur and the Flow will execute multiple times.

 

If you want to know which field value has changed, we are not able  to achieve this requirement through Flow's existing action.

We can only monitor whether the entire list has changed using When an item is created or modified, and we can't know which field's value has changed.

 

In addition, we generally use Condition to determine whether the current Flow is triggered due to the item is changed or a new item is created. Created is equal to Modified, indicating that this is a newly created item; otherwise, this item has been updated.37.PNG

 

Best Regards,

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

Re: SharePoint List: Item Created Or Modified: Flow Runs Twice

Thanks for your response. 

 

Am I therefore to understand that this functionality is by design? If a Flow is triggered by a modification to a list item, then any update of that item will trigger the Flow again? 

 

Is there any way to specify that the Flow should be triggered only when an actual user modifies the item?

 

Thanks!

Super User
Super User

Re: SharePoint List: Item Created Or Modified: Flow Runs Twice

@PoKasia 

The situation is unchanged - there is no trigger that fires only when a SharePoint list item has been modified.  You can use the technique offered by @v-bacao-msft to work around this issue.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
PoKasia
Frequent Visitor

Re: SharePoint List: Item Created Or Modified: Flow Runs Twice

Hi Scott,

 

I think that maybe my question is not clear.

 

I am not having an issue with determining that a Flow is triggered due to the item being changed or created.

 

My issue is that my Flow modifies the item on which it is running, and this in turn triggers the Flow to run, again and again, every minute, in an endless loop. How can I stop it from doing that? I want my Flow to run ONCE, when a user modifies an item. 

 

Edit your flow   Microsoft Flow.png

 

Thanks in advance!

 

Kasia.

Super User
Super User

Re: SharePoint List: Item Created Or Modified: Flow Runs Twice

@PoKasia 

Here is one way to address your situation:

  1. Add a condition at the top of your Flow
    1. If the created and modified dates/times are the same, use a control terminate action (success) to stop the Flow
  2. Create a new column and make it hidden - I suggest a text column and call it Flag
  3. When the Flow runs, set the Flag column to "Stop"
  4. Add another condition below the condition that compares the dates that checks the checks the value of the Flag Column
    1. If the column is equal to Stop, the use a control terminate action (success) to stop the Flow

If you need an example, please let me know.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (7,890)