We will learn to Exit & Sign-out from a Canvas App. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Apps.
What is a Canvas App?
A Canvas App is a custom app which follows the low code / no code methodology. Itstarts from a blank canvas where a maker or a developer can drag and drop various components into a flowchart style formation.
Click on the given link to learn more about Canvas Apps – https://www.crmcrate.com/power-apps/
How to Exit from an App?
- We will use the “Exit()” function for exiting the currently running app. An application user is returned to the list of Apps available in the studio. The user can then select another app to open.
- Executing an Exit function stops any further formula evaluation. Any function calls chained with a semicolon operator after the Exit aren’t carried out.
- Use the below given Power FX function for simply exiting ap App.
How to Sign-out from a Canvas App?
- We will again use the “Exit()” function for signing out an application user from currently running App by passing a boolean true value in the same function.
- Exits the current app and the user is signed out. The user will need to sign back in with their credentials before running an app.
- Use the below given Power FX function for signing out an application user.
Exit( true )
How to implement an Exit Confirmation Box for the user in a Canvas App?
- Navigate to Power Apps Studio (https://make.powerapps.com/) and open an App as per your requirement.
- Select the main App component and navigate to the properly called “ConfirmExitMessage”. Provide an exit confirmation message as shown below.
- This implementation will work with both Exit() and Exit(true) formulas.
Validating the implementation in Power Apps
Once the above Power FX formulas are configured, navigate to the App and validate the implementation as shown below.