cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Does Power Automate "Check Out" Files from OneDrive for Business?

Hello,

 

Background: 

I have a PowerApp that is used for Viewing and Reserving vehicles at my workplace. The part of the app that is for reserving works as follows:
- 4 Variables are input by the user in PowerApps, (Start Date, End Date, Point of Contact, and Project). 

- Vars are accepted by my Cloud Flow via the PowerApps connector. 

- In Automate, Get the tables and list rows from my OneDrive via the Excel Online (Business) Connector

- Select the RegistrationID from my Calendar table (an excel sheet)

- Initialize a variable that calculates the Max(RegistrationID) (so i can then +1 in the next step for the next available ID). 

- Add a row into my calendar table using the 4 vars from PowerApps, and then incrementing 1 from the Max(RegistrationID). 

- Respond to PowerApps with the new Registration ID. 

- Terminate on success. 

 

My Problem: Once this flow runs, for about 10 minutes following, I cannot refresh my data source in PowerApps. When i click my refresh button, the "ants march" across the screen, and then i get the red "!" near my refresh button and get the following error. 

"The requested resource is locked. Server response: Cal (my table name) Failed: Cannot write file to filesource. File is being locked. clientRequestID: (a long string of text) , serviceRequestId: (another long string). " The kicker is that after about 10 minutes or so of this error, I can click refresh and it will work fine, and update the values in my table. No change on my end, I don't even need to close and reopen the app. 

 

My Theory: This is being caused by Automate when it is executing this cloud flow. I came to this conclusion because I have run the following tests. First, I can just open, modify, and close my Excel sheet on my computer at will, and as long as it is closed when I click refresh, the app will refresh successfully and show me my new entry or change immediately. Also I have some Patch() commands in my app that do some more simple updates, and these happen immediately and again don't cause this error.

 

So am I correct? Does Automate "Check out" my Excel sheet and then give it back after a few minutes of activity? Why does it not affect my ability to open the Excel sheet on my computer while PowerApps thinks its "locked"? Im at a total loss and about to just switch this flow and a few others to be Patch() commands in PowerApps because my workflow is paused whenever this Refresh ability is locked.

 

Thanks in advance. 

1 REPLY 1
Frequent Visitor

I found my own answer!

I cant believe I was so dumb to not do this before. I was looking through the Documentation on MS's website for the Excel Online for Business connector, which I cant believe I had not thought of going to check. Right there on the page you can see under Known Limitations, 

"An Excel file may be locked for an update or delete up to 6 minutes since the last use of the connector."

 

Link here: https://docs.microsoft.com/en-us/connectors/excelonlinebusiness/

 

Back to the drawing board I guess. 

 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (74,834)