cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
E-Van
New Member

2 year ongoing issue still not solved - Update File Properties from Excel Table _ Locked by user error

I've seen posts for this with no solutions, although I'm a fairly new user. My flow takes the newly created Excel file, and updates the library columns from the Excel table (1st pic). I planned on using that data to guide my approval flow, so I need it to upload instantly to be able to review and begin the next flow.

It retrieves the data from the newly added excel table perfectly (2nd pic), but when I try to use that data, it says "Locked by user (Me).com" (3rd pic). FYI, I do not have it open in any way.  When running the test, I can see the data in the body of 'Get Row' (5th pic), so I know it's there, however, I'm locked out by myself from using the data. If I apply a 7 min delay (seen from another user), it works (4th pic), but unfortunately defeats the entire purpose of the flow to save me time and errors. Also, I'm not sure it's even working 100% of the time.

Is there a way to directly pull the data from the JSON body, or any other solutions? It bewilders me that I can see the flow has obtained the data prior to returning the "Status 400"  error in the following step, I just can't access it.

 

Please please please!!! help

Library Data.JPG

 

Flow Error.JPGFlow Working.JPGBody - Table row data.JPG

2 REPLIES 2
E-Van
New Member

 

Sorry, it kicked out my second picture... here it is

FLow Details.JPG

rolanddaane
Frequent Visitor

Here's a solution I call whenever I create a flow that does something with file metadata.
https://app.box.com/s/5xcw9h59pw5mk0prs7oloio6aarsc7wv 

In short: call the api and check if it is locked.

_api/web/GetFolderByServerRelativeURL('@{body('Get_file_properties')?['{Path}']}')/files/getbyurl('@{body('Get_file_properties')?['{FullPath}']}')/LockedByUser

Convert the output to a string: string(outputs('Send_an_HTTP_request_to_SharePoint')?['body'])


Create a compose that returns True/False: contains(outputs('Convert_HTTP_Response_to_String'),'LockedByUser')
If the output contains "LockedByUser" then find the user by creating a new compose:

@{outputs('Send_an_HTTP_request_to_SharePoint_get_file_locked_data')?['body']['d']['UserPrincipalName']}







Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (2,887)