cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grhsVman
Helper I
Helper I

Trouble Using "When a file is created or modified (properties only)"

Originally posted here: https://answers.microsoft.com/en-us/msoffice/forum/all/trouble-using-when-a-file-is-created-or-modif...

 

What I have done:

  1. Created a Flow against a Document Library in SPO using the "when a file is created or modified (properties only)" trigger
  2. Included in the flow, an "Update file properties" action

 

Here are the results:

  • If I create the file and close it quickly (from the browser Excel app), the flow is successful in updating the targeted file property
  • If I modify a file and close it quickly (from the browser Excel app), the flow is successful in updating the targeting file property
  • If I wait too long after creating or modifying the file, the flow is unsuccessful with this error, "The file...is locked for exclusive use by..."

 

Obviously, this suggests that the file is "locked for exclusive use" while I have it open. This also suggests that the flow doesn't kick off immediately. If I close the file before the flow kicks off, the flow can work because it is not locked. If the file is still open, the flow can't be successful.

 

If my suggested conclusions are valid, WHAT IS THE POINT OF THE "When a file is created or modified (properties only)" trigger? In common workflows, a user is going to create a new file and then leave it open in the browser. The file will always be locked and actions that update file properties will NEVER WORK.

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @grhsVman,

 

"When a file is created or modified (properties only)" is a pop trigger, once a new file is created or modified in the SharePoint library, it will trigger the Flow. When you editing the Excel file in SPO, the file will save automatically, it means though you haven't put all data into the Excel file, the Excel file will save automatically to make the Flow be fired.

And the update file profiles action should make sure the file is available, it shouldn't be opened or it will fail.

As a workaround, if you want to update the file profiles after you create a file or modify a file, you could create a delay action to make sure the user has enough time to edit the file, for example:Annotation 2020-07-13 134925.jpg

 

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

 

View solution in original post

2 REPLIES 2
abm
Super User
Super User

Hi @grhsVman 

 

The lock error you are getting for trigger or update step?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
v-litu-msft
Community Support
Community Support

Hi @grhsVman,

 

"When a file is created or modified (properties only)" is a pop trigger, once a new file is created or modified in the SharePoint library, it will trigger the Flow. When you editing the Excel file in SPO, the file will save automatically, it means though you haven't put all data into the Excel file, the Excel file will save automatically to make the Flow be fired.

And the update file profiles action should make sure the file is available, it shouldn't be opened or it will fail.

As a workaround, if you want to update the file profiles after you create a file or modify a file, you could create a delay action to make sure the user has enough time to edit the file, for example:Annotation 2020-07-13 134925.jpg

 

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

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,524)