web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Notify Patch Error Mes...
Power Apps
Answered

Notify Patch Error Message and Error

(0) ShareShare
ReportReport
Posted on by 1,142

Thank you for taking the time to read my question.

 

I'd like to be able to notify my user of any error encountered when trying to Patch / update a record in a SQL table. In the following code .message is red and underlined saying it's a table not text. I don't understand how to fix this.

 

Patch('[dbo].[FacilityAccess]',LookUp('[dbo].[FacilityAccess]',AccessID = Value(DataCardValue1.Text)),{UserEmail:TextInput2.Text,IsQA:DataCardValue6.Value,IsAdmin:DataCardValue7.Value,FacilityAccess:lblSelectedFacilities.Text});
If(IsEmpty(Errors('[dbo].[FacilityAccess]')),Notify("Record Updated",NotificationType.Success),Notify(Errors('[dbo].[FacilityAccess]').Message,NotificationType.Error))

 

Thank you for your time

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @iwonder 

     

    Make sure that you have enabled "formula level error management" setting in Experimental features of Advanced Settings of the App. Then, you can try out the below expression:

    Set(isSuccessful,true);IfError(Patch('[dbo].[FacilityAccess]',LookUp('[dbo].[FacilityAccess]',AccessID = Value(DataCardValue1.Text)),{UserEmail:TextInput2.Text,IsQA:DataCardValue6.Value,IsAdmin:DataCardValue7.Value,FacilityAccess:lblSelectedFacilities.Text}), Set(isSuccessful,false));If(isSuccessful,Notify("Record Updated",NotificationType.Success),Notify("Error encountered",NotificationType.Error))

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • iwonder Profile Picture
    1,142 on at

    Hi @yashag2255 

     

    Thank you for your quick reply. I was already able to do that. What I'd like to be able to do is instead of Notifying "Error encountered" I'd like to be able to show the Errors().Message and Errors().Error text so it's clear to the user what the error was. That way when they email me saying something went wrong we have more to go on.

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @iwonder 

     

    I am afraid but this is not doable as per current capabilities. If you think this should be added, please raise an idea or upvote of exists already here: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas 

     

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • iwonder Profile Picture
    1,142 on at

    Hi @yashag2255 

     

    Thank you very much for letting me know. That's very unfortunate.

     

    have a great day

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard