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
v-bacao-msft
Community Support
Community Support

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.

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!

@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

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.

@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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,349)