cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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

Highlighted
Advocate III
Advocate III

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")

 

Highlighted
Frequent Visitor

Re: exit() and return to custom destination

Worked for me!

Thanks!

 


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

 


 

Highlighted
Frequent Visitor

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?

Highlighted
Advocate II
Advocate II

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 ?

Highlighted
Advocate III
Advocate III

Re: exit() and return to custom destination

Apps now include actions on close exit.png

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,983)