0

I am trying to find a way to update a column in a folder (not a list) that contains files that need to be approved by reviewers. Each reviewer has a Yes/No filed that will be updated by an action My problem is that if I pick a trigger that says "When a file is created or changed with properties)" then the action at the end of the approval triggers the flow again What can I do to break this loop ?

Update: in the mean time I realized that the trigger has "Limit columns by view" which should restrict the changes to any column present in the respective view. If I build a view that leaves out the "Approved by" columns the trigger still kicks in if I change one of those columns

Why does that happen?

Could this be because of this https://docs.microsoft.com/en-us/sharepoint/dev/business-apps/power-automate/sharepoint-connector-actions-triggers#supported-triggers I have Sharepoint via Office 365 it is certainly newer than Sharepoint 2019

1 Answer 1

1

There are a few techniques you can use to address this issue. The most common is to use a trigger condition to check which user account last updated the list item or file metadata in SharePoint. If that account is the one used to author the flow, then you can assume the flow is being triggered because of a change to the list item or file metadata by a previous run of the flow and stop processing.

This technique is described in this blog post: Avoid Infinite Loops In Power Automate.

Screen capture of the trigger condition

Another option is to use a Date Time field that stores the date and time the list item or file metadata was last modified by the flow. Then in the trigger you use a trigger condition to check to see if the value of that field is recent enough that you can assume the last update was made by a previous run of the flow.

If you search for "Power Automate Infinite Loop" or "Power Automate Update Loop" you will find several additional resources that discuss the topic.

2
  • I ended up using a version field set manually by the author. After get file properties I test that first. If that version name changes I proceed with creating an approval. the approval will set the approved by field to Yes or no. That will trigger another change but this time the version field was not changes so the approval is not created and the loop breaks
    – MiniMe
    Commented Feb 18, 2022 at 0:11
  • that filed is needed anyway to trigger a review by the others otherwise an approval will be triggered for every time the author saves the doc or when it is saved automatically
    – MiniMe
    Commented Feb 18, 2022 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.