Deep Linking In PowerApps

Deep Linking In PowerApps

Introduction

In this blog, we will learn how to implement deep linking in PowerApps.

Usecase

As we know sometime we need a link in email, which redirects the user to particular screen of the PowerApps rather than the default screen, in that case we need deep linking, let us discuss this.

Function for the blog

Param

The Param function retrieves a parameter passed to the app when it was launched. If the named parameter wasn't passed, Param returns blank.

you can find more details for the function: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-param

Steps

  • First and basic step is to create new PowerApps
  • Create splash screen/loading screen. I always prefer splash screen in PowerApp because it provide us a way to initialize global vaibales, collection and some other suff. If you want to learn how to create splash screen please refer to my other article.

On timer end event we will fetch the paramter passed in the app and then put the condition which decides where to navigate. Please refer below code,

Switch(
    Param("goto"),
    "page1",
    Navigate(DeepLinkingPage1),
    "page2",
    Navigate(DeepLinkingPage1),
    Navigate(DefaultPage)
)

Deep Linking In PowerApps

Save the app, run the app with parameters like below,

  • https://apps.powerapps.com/play/e/default-[EnvironmentID]/a/[PowerAppsID]?tenantId=[TenantID]&goto=page1
  • https://apps.powerapps.com/play/e/default-[EnvironmentID]/a/[PowerAppsID]?tenantId=[TenantID]&goto=page2

Please refer attached app for more details.