Exit PowerApps, Are you sure? Microsoft Power Apps exitconfirmation 1

Today I had a look at exiting a Powerapp. I create the My Exit App. This app has just a single button.

My Exit App in PowerApps

The button in the app calls the Exit Function to exit the app. When you run this app you will see some different behaviours depending on how you are running the app.

Exit in Design Run Mode

In design mode when you press F5 to test your app, you will find that nothing happens.

Exit in Run Mode

When you run the app within PowerApps you end up back home

Back Home

Exit on your mobile

On you mobile device you also go back to your list of apps on the PowerApps home screen.

Exit from a SharePoint WebPart

If you add the PowerApp as a web part on a page in SharePoint.

Exit On Page

The exit button will make the app appear empty, ready for the user to navigate in SharePoint.

Exit to Blank

Exit from the Appid Web link

The url that can be found on the Details screen for the app will open the app as it was opened from Dynamics 365. No surprise here that you will go back to the Dynamics 365 home page.

Dynamics 365 home

 

Are you sure?

With all of the above options the exit button will leave the app immediately without asking you if you really want to leave the app. There is however an option on the app that you can set to protect the user from losing unsaved data.

The Confirm exit message and Confirm exit will protect your app.

Exit Options

Within the confirm exit message you can set a message that you want to appear when the user closes the app.

Update Exit Settings

If you configure these settings as shown above the click of the exit button will warn the user:

Exit Confirmation

My thoughts

To implement this exit protection you could have created a separate screen asking the same question. This “Are you sure”-screen would then be called before any Exit function that is called. It might more feel like the same experience as the rest of your app.

I also noticed that when you close a tab in your browser the app still closes without any warning. Hopefully this is something that can be avoided too.

 

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

3 thoughts on “Exit PowerApps, Are you sure?”
  1. Peter, do you know if there is a way for a PowerApp to determine its runtime environment? If my app is running in a SharePoint webpart, I want to hide all options to “Exit.”

    1. Hi Don,

      You could pass in a parameter when you run the app from a SharePoint page when you run it from an SharePoint page. Then within your app read this parameter so that you can hide the option to exit

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading