web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / 'When an item in SP is...
Power Automate
Unanswered

'When an item in SP is modified' flow running infinitely even when item is modified just once

(0) ShareShare
ReportReport
Posted on by 274
Hi there, I have a simple flow triggered when an item is modified in a SP list. The flow at the moment is configured just to update a status field when an item is modified upon clicking Save button. This flow keeps running every few seconds without stop even though i modified the item just once. Anyone faced any similar issue? Any help would be appreciated. Flow logic 1. When an item in the list is modified. 2. Check the value of Operator_Status field using Switch. 3. If value eq Closed. Update another field. 4. If value eq Rejected Update another field. Regards, Kevin
Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    maybe you can try the "terminate" action to see if it helps?

  • kevingeorget Profile Picture
    274 on at
    Thanks for the reply @Anonymous Unfortunately this wont work. My flow is running successfully and it's that new instances keep running one after other. Will i be able to kill off the flow after one successful run? Or are you referring to some other action.
  • Verified answer
    Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Since your flow is set to run when an item is modified, the fact that your flow modifies the item will then trigger the flow to run again. Yes, this is silly. No, there is no easily configuration option to turn off this behavior.

     

    If you search around, you'll find you're not the only one struggling with this, and you'll also find that people have come up with a variety of solutions. One option is to change the trigger to only run when an item is created instead of on each modification. Of course, this is not a trivial undertaking, and since flow doesn't have a "wait for change in current item" like sharepoint designer did, these sorts of workflows have their own issues.

     

    One strategy for dealing with this is:

    1. Create a new field named "status_old"
    2. Add a condition to the very beginning of the flow to see if status = status_old
    3. If they match, the status was not updated, and so do nothing (this instance of the workflow then ends)
    4. If they don't match, the status was updated, so update the list as needed, and also set status_old to the current value of status

     

    Example:

    • The workflow runs, status="submitted", status_old ="". Since these fields don't match, update the list as needed. After the workflow runs, these fields are now: status="submitted", status_old ="submitted".
    • The workflow runs again automatically. Since these fields match, the workflow does nothing
    • The user updates the status to rejected, so: status="rejected", status_old ="submitted". Since these fields don't match, update the list as needed....
  • kevingeorget Profile Picture
    274 on at
    Thanks a ton @Mike2500.
    That's one wierd bug for flows.
    My requirement is that the workflow needs to be run when the item is modified only.
    With the approach you have mentioned, do you think it would create an overhead on the servers if say this list has items around 100. There would be 100 instances running non stop then.
  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Flows will not run non-step, they'll run one additional time per modification. So, users modify 100 items, the flow will run 100 times for each modification, and then the flow will run an additional 100 times since the flow modified the original item. This is not a load to be concerned about, but it does double the number of runs. which could turn into a licensing issue (since flow licenses have a cap on the number of runs per month).

     

     

  • CW Profile Picture
    1,044 on at

    Actually, yes they do. I modified 2 items and I'm getting one for each item every minute. AND I have teminate on. So msft seems to have designed powerautomate to be purposely problematic just like most of their....stuff.

  • CW Profile Picture
    1,044 on at

    Tx Mike.

    Ya this, like many many other msft issues with the software of which there are many this should not be an issue.

    If I create a similar simple expression in Excel or Access do those progreams shudder and shake because they went into a loop and crash the program? I really wouldnt be surprised but they don't.

     

    CLEARLY pow. aut. is farrrrrrrr from polished if a simple little issue like updating an item which by the way IS WAHT EVERYBODY DOES IN EVERYTHING THEY DO ON A COMPUTER!!!!!!! C'MON THIS IS CRAZY

  • CW Profile Picture
    1,044 on at

    Yes you would think right??? NOPE, doesn't work for me. I think they just put these little objects in their software to make it seem they're being diligent. Meanwhile they do @#$-all

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Double check your logic vs my example. Terminate ends the current instance, but if you have a modify action, it will trigger the flow to run again.

     

    open excel and get a friend to shout "it changed" every single time cell A1 changes, and get another friend to set A1 to the current time any time the first friend shouts "it changed!" Then, change cell A1.  What happens? Your friends are going to be there for a while, as friend 1 shouts "it changed!", friend 2 updates cell A1, at which point friend 1 shouts "it changed!" again. If you tell friend to update cell A1 and then stop, it doesn't matter, as they are still instructed to change Cell A1 anytime the other friend shouts. 

     

    We can get the one friend to shout "it changed by xyz", shouting the name of who changed it, have friend 2 only update cell A1 with the current date if the person who changed it was someone else besides them (people will often use service accounts in flow, and they will check to see if the person who changed the item was different than the service account). Or, as previously suggested, we can use some other field to know if a particular field changed. In this example, the friend can also shout the value of B1 and B2, and friend 2 can then update A1 only if B1 and B2 are different. When friend 2 updates A1, they would also set B1 and B2 to be the same, which means friend 2 won't update A1 unless some other process runs and changes the value of B1 or B2. 

     

    Sorry if the analogy got out of hand. Hope that makes sense.

     

     

     

     

  • CW Profile Picture
    1,044 on at

    Haha thanks Mike. BUT what if it's a Tuesday with a full moon?? 😀 All joking aside that is pretty much how msft programs behave.

     

    Thanks for the analogy, no not out of hand, that's the way I describe things as well. 👍 I get how the loop logic works, but in actuality it's not our job as users to fret over stupid things like this. This is functionality that should be done PROPERLY by the makers of the tech. NOT constantly and consistently relying on us users to come up with workarounds and hacks!!! EVERY SINGLE TIME, EVERY(!!!) TIME I go to build something even so simplistic as this there is INVARIABLY a wall, hurdle or gotcha. [Got a 4" tube and you want 1" of string sticking out both ends? Well with msft you get the 4" tube and 5" of string. Pull it out at one end to achieve that 1" but you loose it at the other end. LOOP] - This is my experience with msft programs. Things are just never completed, period. It's mostly half-assed. Then you have the experts weighing in as though they work for msft and you've hurt their itty-bitty feelings.

     

    Anyway, since terminate function apparently does !@$#-all in this case, I managed to simply add a second condition within the first conditions "No". I checked for if "Created" = "Modified". If so, new item, do the update, else "No". This seems to yield only two expected runs "Succeded" and "Cancelled". 

     

    I learned that one off a a couple user posts. Seems EVERYONE has been complaining about this issue for years. And what's being done? As per ususal,  more data connections to teeny social media stupidity. Msft is trying to be too much to a certain demopgraphic and dropping the ball on completing current tech.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard