Latest Posts

PowerApps Deep linking in the app


In this article, we are going to learn how we can change the start screen of the app and how we can use parameters to deep link the navigation from the start screen to the different screens within canvas app. This article explains the StartScreen function with example.

How to change Start Screen (loading screen) in PowerApps?

  • By default, in PowerApps, the screen listed first in the screen menu will be the home/default screen which will open when you arrive or open the app. E.g. here, HomeScreen will open first.
  • PA homescreen
  • But what if instead of HomeScreen, I want to open AdminPanel or UserScreen? Is it even possible?
  • You must be thinking about App OnStart property, correct? But wait, there are some limitations.

Note: You cannot use Navigate function in OnStart property.

PA Onstart
  • There is one new property of the app that you can use over here. StartScreen.
  • As the name suggests, you can mention the start screen of the app over here.Note: If you keep the StartScreen property blank, by default it will take the first screen (which is default screen) from order.
  • For this example, we will write AdminPanel screen, save and publish.
  • When you run the app, you can notice it moves to the AdminPanel, which is second screen in the order.
  • PA Play
  • You can also test in Edit mode. Click on the ellipsis from the App and then click on Navigate to StartScreen.
  • PA Navigate to start screen
  • In the edit mode itself, you will be redirected to the Start screen – Admin Panel.
  • start screen admin panel

How to Navigate to a specific screen based on parameter?

  • If you are an admin, the app will start with admin page and if you are any user other than admin, then app will open the User panel. How to achieve this?
  • Here, we will target the query string parameter passed in the app URL.
  • First, get the App URL from Apps >> Your App >> Details >> Web link
  • PA WebLink
  • We need to append a parameter in this URL. This parameter will help us to identify the destination URL. We have taken paramValue as Query string parameter and in the code, we are going to check for this parameter.Note:

Query string parameter and its value both are case sensitive, so make sure about that while using them in the code.

  • Go to the StartScreen property of the app and write formula like below.
  • PA StartScreen formula
  • Incase you want the code:
If(

Param("paramValue") = "admin",

AdminPanel,

Param("paramValue") = "user",

UserScreen,

HomeScreen

)

App restart parameter


We value your Feedback:

Page URL:

Name:

 

Email:

 
 

Suggestion:

 

© 2024 Code SharePoint