cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cripp88
Advocate I
Advocate I

Update File - Doesn't Work in Condition or Switch

I created a Flow today that I've done several times - When an email is received, get the attachment (Excel), update a OneDrive file with the content, create a table in the document, and list rows present in the table. This all worked absolutely fine.

 

I have three different emails with the same attachment that can be sent, so I wanted to managed these with one Flow. I knew that I couldn't update the same file - if the emails were received close together, two instances of the Flow would be trying to update the file simultaneously and there would be conflicts. So I created three 'processing' files.

 

However, I've tried managing the structure using Conditions and Switch, but the Update File action fails. I've stripped it back to the original structure and it starts to work again. Is there a bug when using Update File within conditions/switched?

 

When using a condition, the error is 'file locked or checked out'. When using switch, it just says 'unexpected exception'.

 

I've tried deleting the files and recreating them within Excel Online so they should be checked in. The issue still happens.

 

locked file 1.PNGlocked file 2.PNGlocked file 3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Cripp88,

 

I have reproduced your Flow, but I do not find the same issue, the update file in the branch of Switch could run successfully.

What's your file content input in the update file?

Annotation 2019-10-21 094417.png

Run result:

Annotation 2019-10-21 094528.png

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

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @Cripp88,

 

I have reproduced your Flow, but I do not find the same issue, the update file in the branch of Switch could run successfully.

What's your file content input in the update file?

Annotation 2019-10-21 094417.png

Run result:

Annotation 2019-10-21 094528.png

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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,521)