Hi,
I'm playing around with PowerApps and trying to build up my skills. One feature I'd like to impliment in the app I'm designing at the moment, is a detailed error notification. This would be good for debugging, and if I can figure out how to save the details of the error I could also perhaps log them to a file at a later date.
Here is the code I have at the moment:
Patch( Table1, Defaults(Table1), {Fruit: TextInput1.Text}, {Age: TextInput2.Text} ); If( IsEmpty(Errors(Table1)), Notify( "Success", NotificationType.Success ), Notify( "Error Encountered", NotificationType.Error ) )
I'd like to change the "Error Encountered" part, to contain the patch error message, which can be seen when in the app studio (see attached - including a clientRequestId and serviceRequestId which I have omitted).
Any ideas on how this can be done? Many thanks.
Solved! Go to Solution.
Have you looked at the Errors function?
This will give you a Table of Errors which will include more detailed information.
Hope this helps.
Have you looked at the Errors function?
This will give you a Table of Errors which will include more detailed information.
Hope this helps.
Thank you for your response. Revisiting that link with fresh eyes, I found the solution.
My formula now looks like this and is working:
Patch( Table1, Defaults(Table1), {Fruit: TextInput1.Text}, {Age: TextInput2.Text} ); If( IsEmpty(Errors(Table1)), Notify( "Success", NotificationType.Success ), Notify( First(Errors(Table1)).Message, NotificationType.Error ) )
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
202 | |
173 | |
60 | |
32 | |
30 |
User | Count |
---|---|
306 | |
264 | |
104 | |
79 | |
56 |