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.
Yes, you can create a pop-up menu that looks like this.
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."
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
190 | |
70 | |
50 | |
37 | |
28 |
User | Count |
---|---|
243 | |
114 | |
91 | |
91 | |
69 |