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 / Update File Properties...
Power Automate
Answered

Update File Properties in SharePoint handling locked file

(1) ShareShare
ReportReport
Posted on by 144

Hi Everyone,

 

I have a Flow which is triggered on the create or update of a document in a SharePoint library.

The last step of the flow updates the file properties. The Flow fails if the file is locked by the user. How can I force a wait and/or retry until the lock is removed to ensure the document properties are updated?

 

 

Categories:
I have the same question (0)
  • alrezac Profile Picture
    on at

    Hi,

     

    You there are a few ways that this has been answered so far but if I were you I would go with the simplest set up. Take a look at the communities post below; and copy its suggestions for your flow. It would basically run the exact same way and it should achieve what you are looking to do.

     

    https://powerusers.microsoft.com/t5/Building-Flows/retry-flow-after-failure/td-p/148790

     

    Regards,

     

    Alex

     

    -------

     

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

  • Verified answer
    bhitchlockfcs Profile Picture
    144 on at

    Thanks @alrez 

     

    That wasn't the right solution for my problem.

     

    https://sharepains.com/2019/09/27/retrying-after-failures-in-microsoft-flow/ gave me a good start to finding the solution.

    I found that the body of the failing step contained the error message and status code. So I added a Scope and configured it to run after the initial Update action failed.

     

    First I parsed the JSON of the body from the failed step to get the Status code, which I assigned to a variable called ErrorStatus.

    Get Error from Failed Step.png

     

    I then added a Do...Until loop set to run until the ErrorStatus was 100.

    Retry until Error is changed.png

    I repeated the update action and configured the run after fail to update the ErrorStatus.

    I then added another step configured to run after the previous step was skipped to Set the ErrorStatus to 100 to exit the loop.

     

    I will probably refine this but it's doing what I need it to.

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard