cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
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
Highlighted
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

Highlighted
Frequent Visitor

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,592)