cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
buildbod
Level: Powered On

exit() and return to custom destination

Can the exit() formula be used to exit the app and redirect the user to a specific page rather than the apps list.

 

For example:

 

I have an app that is launched by clicking a link in a SharePoint page

I want to close the app and return back to the SharePoint page

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: exit() and return to custom destination

Hi @buildbod,

 

No, I don't think that will work.

Exit function in PowerApps

"

The Exit function exits the currently running app. The user is returned to the list of apps, where they can select another app to open.

Syntax

Exit()

"

And currently it only accepts one parameter, boolean value of logout.

Exit(Logout)

 

For example, Exit(true), which then would have the app automatically log out the current user and navigate to the login screen of PowerApps.

 

A workaround here is:

Add a launch function before the Exit(), specify the SharePoint Address within the Launch(), for example:

Launch("https://powerusers.microsoft.com");Exit(true)

This would open a new webpage of the SharePoint page, not the original one.

 

Hope this is helpful.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: exit() and return to custom destination

Hi @buildbod,

 

No, I don't think that will work.

Exit function in PowerApps

"

The Exit function exits the currently running app. The user is returned to the list of apps, where they can select another app to open.

Syntax

Exit()

"

And currently it only accepts one parameter, boolean value of logout.

Exit(Logout)

 

For example, Exit(true), which then would have the app automatically log out the current user and navigate to the login screen of PowerApps.

 

A workaround here is:

Add a launch function before the Exit(), specify the SharePoint Address within the Launch(), for example:

Launch("https://powerusers.microsoft.com");Exit(true)

This would open a new webpage of the SharePoint page, not the original one.

 

Hope this is helpful.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

buildbod
Level: Powered On

Re: exit() and return to custom destination

Ok thank you. I'm using the work around already though it is a little clunky as you end up with two tabs. One with the closed app (which redirects to the app list) and one with the SharePoint page. Ideally the function would allow for:

 

exit("url of page")

 

In the case of an app launched from the views in a SharePoint list then the behaviour needs to be automatic i.e.

 

exit("return to list from which the app is launched")

 

Kavzz
Level: Powered On

Re: exit() and return to custom destination

Worked for me!

Thanks!

 


Launch("https://powerusers.microsoft.com");Exit(true)

 


 

ANdreVT
Level: Powered On

Re: exit() and return to custom destination

How can i do procedure if I would like to ask to the user "Do you really want to leave the app? before launched to a new web pagE?

lknudson1
Level: Powered On

Re: exit() and return to custom destination

Maybe have the current Exit button open a "Confirmation" Screen wtih "OK"/"Cancel" buttons, and then relocate the 'Exit..." logic from Exit button to the "OK" button on confirmation screen.  "Cancel" would just close Confirmation Screen ?

buildbod
Level: Powered On

Re: exit() and return to custom destination

Apps now include actions on close exit.png

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,824)