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

Override file lock sharepoint for deletion

So, I'm create a temporary file in sharepoint, to extract the rows and put them in a sharepoint list.

on new item in list
1. Grab the attachment from item
2. Save it to sharepoint

3. Get rows from Excel on the sharepoint file
4. Shove them in another list
5. Delete the temporary file

Issue is, I think the api calls to Excel Online lock the file (by me) but I've got no way to release that lock.
I've tried checking in the file, checking it out, nothing works, and I'm left with the temporary file being stored on there, until I go in and manually override the lock.

Is there a way to override/bypass a lock within powerautomate ?
An approach I saw was to put the delete in block in a while loop, wait 2 min, try, if fail try again, until it works, but that feels slow and kludgy.

The powerflow is the only instance of this file being used. It's where it's born, where it performs, and where it dies. Except it won't die 😞

BrokenClock_0-1658965225014.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @BrokenClock ,

 

Modifying in an Excel table will lock the file for about 6 minutes, you can add a Delay action to delete the file 6 minutes later.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

5 REPLIES 5
BrokenClock
Helper I
Helper I

In case someone's doing a similar thing, I've ended up adding a timestamp to the file name, so I don't have flows fail because of duplicate names.

I'll see if I find a better way out of this..

Hi @BrokenClock ,

 

Nice thought!

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

I mean,

It means my flows don't break, but I still can't seem to delete the files from power automate. I'd rather the files got deleted properly, so I don't end up with a GDPR nightmare down the line because of something in those files

Hi @BrokenClock ,

 

Modifying in an Excel table will lock the file for about 6 minutes, you can add a Delay action to delete the file 6 minutes later.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

BrokenClock
Helper I
Helper I

Ah, that's great to know!

 

Thanks 🙂

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,658)