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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / No loop SharePoint upd...
Power Automate
Answered

No loop SharePoint update item trigger

(1) ShareShare
ReportReport
Posted on by 2,340 Moderator

Hi everybody,

 

This post is not a question but a tip I want to share because I didn't found any correct answer that fulfilled my need. I read many post and blogs and the closest solution I found came from Scott J Shearer (Stopping Infinite Loops When Updating SharePoint List Items – Scott J Shearer – M365 and Power Platform Solutions (o365scott.blog)), but his solution works in a one shot way, once value is set trigger will no longer be fired again. His post inspired me and I finally managed to find a generic solution to my need. 

 

So, how to trigger a flow on SharePoint item modifications, modify the item within the same flow without entering in an infinite loop sequence and ignore any flow's updates while allowing infinite flow's run fired by users modifications ?   

Categories:
  • Verified answer
    SamLed Profile Picture
    2,340 Moderator on at

    Here is my solution :

     

    I create a hidden column in the concerned list to store the next item's version label that will be generated by the flow. I simply compute it by incrementing the current version label and store result in the hidden column on item update. In trigger condition I just check if SystemUpdateVersion matches item version label.

    So on the one hand,  when flow updates an item, both item version label and SystemUpdateVersion get same value, item version label is incremented by system and SystemUpdateVersion by flow, next trigger's firing attempt will then be ignored due to trigger's condition. On the other hand, when users update item, both values will never match, user can't modify SystemUpdateVersion, system will increment item version label but SystemUpdateVersion won't be incremented and flow will be fired cause trigger's condition is fulfilled.

     

    Here how to build this :

     

    1° Add a single line of text column named "SystemUpdateVersion" to the list and hide it from edit form

     

    2° Create a Flow that uses the SharePoint “When an item is created or modified” trigger

     

    3° Add the following expression as trigger condition in trigger settings :

    @not(equals(triggerOutputs()?['body/SystemUpdateVersion'],triggerBody()['{VersionNumber}']))

     

    Tip: if you also want flow to ignore item creation to deal with item modifications only, add the following expression :

    @not(equals(triggerBody()['Created'],triggerBody()['Modified'])) 

     

    SamLed_0-1689848636540.png

     

     

    4° Add a compose action and set the following inputs :

    formatNumber(add(float(triggerOutputs()?['body/{VersionNumber}']), 1), 'F1')
     
    5° Add an Update item action to update item that fired the trigger and set the "SystemUpdateVersion" field value using the previous compose outputs.
     
    SamLed_1-1689842315410.png 
     
    Hope this will help !
     
    [Edit 01/18/2024] Trigger condition didn't work anymore, changed triggerBody()['SystemUpdateVersion'] by triggerOutputs()?['body/SystemUpdateVersion'] to fix.

     

  • JoeriGeurtz Profile Picture
    3 on at
    Hi there,
     
    Thanks for the excellent solution. Funny thing, I also got inspired by https://o365scott.blog/2019/12/18/stopping-infinite-loops-when-updating-sharepoint-list-items/ but found out that Sharepoint list items Scott mentioned, seemingly are not the same (anymore?) as library items when it comes to the very specific "append to" setting, because it is missing in the library column settings. Long story short, I'm glad I found your post. 
     
    Thanks again.
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    Add a hidden column in your SharePoint list (e.g., "LastModifiedByFlow" as a Yes/No column).
     
    Set the flow to trigger on item modifications in the SharePoint list.
     
    Before making any modifications to the item in the flow, set the "LastModifiedByFlow" column to "Yes" to flag that the change is coming from the flow.
     
    Because the flow checks the "LastModifiedByFlow" column at the beginning, it will prevent flow-triggered updates from firing the flow again in an infinite loop.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard