Announcements
I'm encountering an issue where my Patch function fails as expected (due to a document being open and locked by another user), but the success notification is still displayed. Here’s the code I’m using:
Patch
If( IsError( Patch( MyLib, LookUp(MyLib, ID = ThisItem.ID), { MyField: Self.Selected } ) ), Notify("Error", NotificationType.Error, 3000), Notify("Success", NotificationType.Success, 3000) )
It seems like IsError isn't properly capturing the error.
IsError
Does IsError not handle certain errors (like file locks) properly? What’s the correct way to manage these types of errors in Power Apps?
Thank you,
Charles
The Patch function itself doesn’t return an error flag that IsError can catch for data-related issues. It simply performs the action, and if there’s an issue (like a file lock), PowerApps doesn’t consider that an "error" for the IsError function to detect.
Use the Errors function, which is designed to detect and handle data-related issues from your data source.
Errors
IfError( Patch( MyLib, { ID: ThisItem.ID, MyField: Self.Selected } ), Notify("Error", NotificationType.Error, 3000), Notify("Success", NotificationType.Success, 3000) )
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 355 Most Valuable Professional
11manish 209 Super User 2026 Season 2
MS.Ragavendar 150 Super User 2026 Season 2