cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dave8
Impactful Individual
Impactful Individual

How can I display alert message after patching data via form?

Hello,

 

I am using "Edit Form" in my app, while submitting the data with "Patch" function.

How can I alert user on successful submission? 

 

Is it possible to disable the screen while submission is in progress and then display the alert message on the same screen? Can you please guide?

 

Thanks,

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User III
Super User III

I guess you have already seen this thread on error handling with Patch:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-with-navigate-stay-on-page-if-there-is...

 

But I usually use Notify function which is also explained in the post:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-showerror

 

I stated the limitation of excel when it is opened while patching because it will have effect on the Error handling above. You can isolate it. When it is closed it will work fine for you. Other datasouce do not have this limitation

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

7 REPLIES 7
dave8
Impactful Individual
Impactful Individual

I have also tried function mentioned in this post - https://powerusers.microsoft.com/t5/Building-Power-Apps/Check-if-Patch-has-saved-the-data-successful...

 

Error Test: My App is connected with Excel file, and I try to submit data while excel file was open.

 

However, here the Error function doesn't even shows error, but infect shows succefully entered entries.

 

On the other hand, In screen I am using EditForm, however I need to patch the record, I am unable to use "SubmitForm" function.

 

Can anyone please help me here?

eka24
Super User III
Super User III

When the excel is opened, you get the false impression that the data is sent to the datasource. Do the alert work when the excel is closed?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

dave8
Impactful Individual
Impactful Individual

Hi @eka24

 

I see that with Patch function, none of the error is being displayed to user, even if the Excel file is opened and data is not sent successfully.

 

While, I want user to know if patch is successful or not. I am lil disappointed that there seems to be no possibility of error handling for PAtch function or there is something wrong in my app, however my app is really pretty straight forward.It has an "EditForm" and "Submit" button. "Edit Form" displays the record from the excel, while "Submit" button patches the data from the form to the respected record.

 

And I see that instead of displaying an error to user, it shows the "runtime" error in the app as indicated in the following screen:

 

submit error.png

 

How can I display this error on app to end user?

 

Thanks,

eka24
Super User III
Super User III

Well it is a known limitation that you have to close the excel before you can patch the data.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

dave8
Impactful Individual
Impactful Individual

I know, my concern is not about the limitation, It is about how to display an error on screen while patching data? Is it so that there is no error handling possibility in Patch?

 

Thanks,

eka24
Super User III
Super User III

I guess you have already seen this thread on error handling with Patch:
https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-with-navigate-stay-on-page-if-there-is...

 

But I usually use Notify function which is also explained in the post:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-showerror

 

I stated the limitation of excel when it is opened while patching because it will have effect on the Error handling above. You can isolate it. When it is closed it will work fine for you. Other datasouce do not have this limitation

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

dave8
Impactful Individual
Impactful Individual

The Error function really does not work when there is an error while submitting the data for me as mentioned previously.

 

However, I am using Edit Form, so I have notified a message in onsuccess event of edit form, while in Submit, I am also specifying SubmitForm function because Patch seems to be not working for handling errors.

 

Not quite happy with this approach, however It seems I have no other choice 😞   

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (68,617)