cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Partisan
Post Partisan

Adding a prompt message when a button has been pressed

I just wanted to ask is there a way to add a prompt message/warning when a button button has been clicked. Well basically regrading the app created, after someone puts in their details and click on the back button by mistake what the button does right now is sends them back to the view page without saving their entry so I wanted to know if there was a way to add prompt message or pop up whichever one works best, whenever they click on the button a message shows up on the screen saying would you like to leave without saving and the option that say yes or no. When yes is clicked it takes them to the view page as the button initially does and when no is clicked it will remain on the edit page to click on the save icon that is located at the top of the page which will now save the entry. 

1 REPLY 1
Highlighted
Super User III
Super User III

@SandraAkujobi 

Yes, you can create a pop-up menu that looks like this.

 

power-apps-popup-menu-3.jpg

 

 

Place this code in the OnSelect property of the back button to show the pop-up.

varShowPopUp

 

You would need to create it from scratch by placing several labels and buttons on the screen.  Then use this code in the Visible property of all the controls.

 

varShowPopUp

 

Then, you would place this code in the Yes button.

Navigate(your_screen_name)

 

And this code goes in the no button.

Set(varShowPopUp, false)

 

 

If you'd like a full-tutorial on how to do it check out this article "How To Create A Pop-Up Menu In Power Apps".

https://matthewdevaney.com/how-to-create-a-pop-up-menu-in-power-apps/

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,893)