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

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-micsh-msft
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

ron_zw
New Member

Hi @buildbod 

 

Try this, it worked for me.

 

Launch('https://your.redirect.link", Blank(), LaunchTarget.Replace) 

 

Ron

 

View solution in original post

10 REPLIES 10
v-micsh-msft
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.

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)

 


 

ANdreVT
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

ron_zw
New Member

Hi @buildbod 

 

Try this, it worked for me.

 

Launch('https://your.redirect.link", Blank(), LaunchTarget.Replace) 

 

Ron

 

BamBam
Frequent Visitor

Just what I needed , Thanks

 

Many thanks!!! That worked exactly as needed. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,760)