cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SandraAkujobi
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
mdevaney
Super User
Super User

@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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,092)