Notifications
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 765 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 272