cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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

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

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

 

Worked for me!

Thanks!

 


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

 


 

Frequent Visitor

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?

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 ?

Apps now include actions on close exit.png

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,692)