cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dgrubesi
Level: Powered On

Submit form success/unsuccess message informaticon

I have NewForm for add new employeers. Screenshot_1.png

 

When i click button Save (on Croatian Spremi) it must give me message if the data is saved correctly to SQL database or not. Something like pop up window, message box or notification. 

 

Save (Spremi) button formula is: OnSelect=SubmitForm(Form1)

 

I try this but this not work for My form: Screenshot_2.png

 

Please if someone have some idea share this with me.

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Submit form success/unsuccess message informaticon

You can put a Notify function in each of them to get your notifications.

 

OnSuccessNotify("Uspjeh", NotificationType.Success)

This will give a "green" success notification at the top of the App.

 

As well, you can do the same for fail:

OnFailure - Notify("Kvar", NotificationType.Error)

 

However, you mention bringing up a popup or message box.  If that is the case, then you will want to create the Popup/message box (this will involve rectangles and lables and a button) on your canvas and set their visible properties to a variable - such as showSubmitResults

 

On the button of the pop up box, set the action to UpdateContext({showSubmitResults:false})

Look at the Error and ErrorKind properties of your form and set the text of the labels in your pop up message accordingly.

In the OnSucces and OnFailure actions of your form, just set them to UpdateContext({showSubmitResults:true})

Your pop up will display and whatever logic you choose for your labels will appear.  User would need to click on the button to continue.

(might also want to consider using a full screen semi-transparent rectangle that appears under your pop up to keep users from clicking on other form controls while your message is displayed.)

 

Hope this helps a bit.  Sretno!

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Submit form success/unsuccess message informaticon

You can put a Notify function in each of them to get your notifications.

 

OnSuccessNotify("Uspjeh", NotificationType.Success)

This will give a "green" success notification at the top of the App.

 

As well, you can do the same for fail:

OnFailure - Notify("Kvar", NotificationType.Error)

 

However, you mention bringing up a popup or message box.  If that is the case, then you will want to create the Popup/message box (this will involve rectangles and lables and a button) on your canvas and set their visible properties to a variable - such as showSubmitResults

 

On the button of the pop up box, set the action to UpdateContext({showSubmitResults:false})

Look at the Error and ErrorKind properties of your form and set the text of the labels in your pop up message accordingly.

In the OnSucces and OnFailure actions of your form, just set them to UpdateContext({showSubmitResults:true})

Your pop up will display and whatever logic you choose for your labels will appear.  User would need to click on the button to continue.

(might also want to consider using a full screen semi-transparent rectangle that appears under your pop up to keep users from clicking on other form controls while your message is displayed.)

 

Hope this helps a bit.  Sretno!

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

dgrubesi
Level: Powered On

Re: Submit form success/unsuccess message informaticon

Thank you. 

OnSuccess Notify("Uspjeh", NotificationType.Success)

This will give a "green" success notification at the top of the App.

 

As well, you can do the same for fail:

OnFailure - Notify("Kvar", NotificationType.Error)

 

This solution Works for me.. Hvala

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,682)