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

1 ACCEPTED SOLUTION

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

8 REPLIES 8
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

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

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,467)