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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,035)