Blog

Apps - How to launch a child Power App in the Windows version of Power Apps

From a canvas app, if you want to launch another canvas app in the Windows version of Power Apps, here's how to carry out this task.

When building apps, there may be scenarios where we want to open another canvas app from the Windows version of Power Apps.

To give a sample use case, this could support the scenario where we have a master application that launches child applications. The reason for this structure could be to segregate functionality for ease of use or performance.

The formula to carry out this task is 'Launch', and there are more details in the documentation beneath:


The remainder of this post walks through how to add this funcationality to an app.

How to launch a Child Power App from a Parent Power App

From the 'master' Power App, we can launch a child Power App using the syntax beneath:
 
Launch(
"ms-apps:///providers/Microsoft.PowerApps/apps/3f94f570-fb0b-4333-90ee-16ea4f3baeb5"
)

The important point here is to insert the app id  for the child app that we want to launch. We can find the app id of the target app by finding the app in the Maker Portal, clicking the (..) menu next to the app, and selecting 'Details'. This opens the view beneath which shows the app id.



The example beneath shows how the formula to launch the child app looks in the designer.



If we now publish and run this app from the Windows Player, clicking the 'Open Child App' button will open the child app in the same instance of the Windows Player.

What happens if we run the 'master app' in a browser?

If were to open the above app in a browser and click the 'Open Child App' button, the browser shows the following dialog. Clicking the 'Open Power Apps' button will then open the app in the Windows version of Power Apps.



How to deep link and open an app in the Windows Player

We can adapt the Launch function to deep link to a specific screen or page in the child app. As an example, here's the syntax to pass a recordID parameter with the value 6545.
 
Launch(
"ms-apps:///providers/Microsoft.PowerApps/apps/3f94f570-fb0b-4333-90ee-16ea4f3baeb5",
{recordID:6545}
)

We can then write formula in the OnStart of the child app to detect the ID and to navigate to specifc screen. We would follow the standard deep linking pattern, which is described in the documentation here.


Conclusion

If you need to launch apps in the Windows version of Power Apps, this post highlighted and walked through the syntax to carry out this task .