The Launch function in Power Apps helps you to open links in your browser from your app.
Launch Function
Table of Contents
The launch function has had a few additional options added recently, and even though they are apparently still in preview they are worth it to have a look at.
Open a site using Launch
The simplest example is shown below.
Launch("SharePains.com")

When you click on the button the site will be opened. Notice that you don’t have to supply the https part of the url although you could do so.
Use query parameters in Launch
There are 3 options to add query parameters. Any of the below options will work.
Launch("Google.com/search?q=SharePains.com")
Launch("Google.com/search","q","SharePains.com")
Launch("Google.com/search",{q:"SharePains.com"})

The 3rd options however is the best option to use as we will see shortly.
Set the LaunchTarget
There is now an additional parameter available if you use the json format to supply the parameters.
The first option is New, which will open the link in a new tab.

The other option is Replace, which will replace the content in your current window.

Note that this only works when you are in the player. In development mode even though you specify replace the url will still be opened in a new tab. I’m actually quite glad that this is the case as I would permanently forget to save my work first.
Also an important thing to note is that the target above is actually set to _self.
You can also simply set the target to a text value instead of using the New or Replace as shown above. More on this can be found at the target documentation.
Calling apps from Power Apps using Launch
Now you could create an app that calls other apps. as shown below.
Launch("https://apps.powerapps.com/play/18295fb3-4723-4388-80d2-09ca5217a2f8",{tenantId:"..."}, Replace)

This works really quite well, the only thing that I noticed is that once again this only works in play mode and when you are testing this in development mode a new tab is opened.
Additionally when you use the Launch function in Development mode, the app is opened in Development mode as well, rather than in play mode.
So with this new feature it is now possible to have multiple apps launching in the same tab making them almost feel like one app.-
[…] The Launch function in Power Apps helps you to open links in your browser from your app. Launch Function The launch function has had a few additional options added recently, … read the launchtarget-launch-function-power-apps post […]
how to link local folder link in power apps
Hi Yorkshire, do you mean a local file system? I don’t think that you can do that.
Is it possible to launch another app in the current Iframe when the current powerapp is embedded in an iframe. It instead opens it in the parent window when using Replace. My thoughts are that target=’_self’ would generally open a link in the current iframe.
Thanks
Danny
Hi Danny, yes the Launch function will open any url in a new tab
[…] there is a property available ThisItem.’Link to item’ to open a document. And Using the Launch function. We can open the […]
That will open the document in the browser and not in the desktop app though.
Hi
I am launching a CRM URL from canvas button click using Launch() in embedded canvas app in CRM
When am using browser the button click will open the record in a new tab
But when am using the Mobile app it is still opening in browser how to open the URL in Mobile CRM native app