Power Apps Deep Linking to Screen App StartScreen & OnStart

Power Apps Deep Linking to Screen App StartScreen & OnStart Hello everyone reza here in this video i will show you how to perform deep linking in power apps there is a new function for the app object called start screen where we can.

Define which screen and the power app we would like to start with when the power app launches and for that we can leverage query string parameters that we can pass when we launch our power app.

I will cover deep linking with security concepts multiple parameters and also show you how we can restart the power app especially where the app is being leveraged through the mobile.

Device so let's get started with the video i have an event itinerary powerapp which allows the users to organize all the.

Important event details all in one place this power app has multiple screens the landing screen for the power app is always the first screen that is placed in the screen's.

Tree view i can move screens up and down using the ellipses option to move the screens in the screen view when a user launches the power app the.

Power Apps Deep Linking to Screen App StartScreen & OnStart

First screen that will show up would be the first screen that's listed in the screen view however there are various scenarios in which you would want to perform deep.

Linking into specific screens for example we would like to provide the users a link that directly takes them to the list events screen.

Or if the user is the administrator of the system they should directly be deep linked into the administration screen when they launch the power app now to perform deep linking.

In the app object we have our function called onstart and this is the first function that gets called when the app is launched and we widely use this for initializing our.

Global variables or prefetching some data into collections we also determine which screen should be shown first let's say in this scenario i would like.

To navigate the user to the list event screen however when i write a navigate function in the onstart property of the app object.

Posts Related:

    I get this message that says

    Navigate is not supported in onstart use the start screen property instead for better performance app onstart function.

    Is imperative in nature it is an ordered list of work that needs to be done before the user is directed to the first screen and typically that screen is the first.

    Screen that is listed out in the screen view but in case i put a navigate function in here first all of these actions have to.

    Complete then it will get to the navigate function it limits the optimization and performance capabilities of power apps.

    So instead of navigating to screens in the onstart function the recommendation now is to use a new property for the app object called start screen.

    And here i can define the screen with which the app should begin with if this is left empty in that case it will pick the first screen in the screen's tree view.

    If i have a screen reference provided here for example list events screen then if this app was to be launched it.

    Would directly start with the list event screen we can even test this out in the edit mode of the power app by right clicking on the app object.

    And we have a new feature here called navigate to start screen so if i select this it will redirect me to the starting screen which now is the list event.

    Screen

    Now with this setup and play if i was to save and publish my power app and if i was to launch this power app.

    This time it will redirect me to the start screen that was specified so app.startscreen is the new declarative way to indicate which screen should be shown first.

    And that in turn doesn't block any performance optimizations for the power app let's try and perform deep linking into specific screens.

    Depending upon query parameters that we can pass to our power apps when we launch our app this can be extremely handy in a wide variety of scenarios.

    For example a new event is created the user gets notified the user clicks on the link in the email and it directly takes the user to that specific event that was created.

    Or provide a link to the user to create an event or if the user is an administrator of the system they should be directed to the admin screen.

    So basically my start screen cannot be hard coded it needs to be conditional it needs to be dynamic and to do that i can pass query string parameters.

    Here i will write a condition to read the value of my query string parameter i can define the name for that parameter i will leverage the switch function.

    The value i will leverage the function param the parameter that i would be passing i will call it screen name if that value.

    Let's say is events in that case i would like to set the start screen to list events screen if that value.

    Is admin i would like to start with the admin screen if that value is event i would like to redirect the user.

    To my event screen and if none of the switch cases are met in that case i would like to set the start screen as the welcome screen.

    This is what the completed formula looks like in my case now to test this out i have to pass a parameter to my power app and for that i would have to save.

    And publish my power app my parameter name is called screen name please bear in mind these are case sensitive so when we are passing these parameters to power apps it has to match.

    The case that's defined here now for my event itinerary powerapp if i head over to details here is the web link to play my power app.

    And if i select this it will launch my power app and start with my start screen which is my welcome screen however here i would like to pass a.

    Parameter to it so it directly deep links into a specific screen in the url i have a question mark meaning there are parameters that will be passed after this.

    One of the parameters here is tenant id right after this i would like to pass another parameter so i'll use ampersand my parameter which is called screen name and then.

    I can define a value equal to events now when i pass the parameter events this time when the app launched it redirected me to the events screen.

    If i pass that parameter as admin it directly deep links into the admin screen and if i pass event it will deep link directly to the event.

    Screen which is my form screen for the user to create a new event remember these are case sensitive so if i was to change the name of my parameter.

    In that case it will not perform the deep linking action same thing goes for the value the events that are listed out on the event screen i can select an existing.

    Event and it will redirect me to the form screen wherein the mode of the form is edit meaning the user can make changes to that specific item i have done multiple videos on reusing.

    The form control and the concept that i recommend to use is when the user selects an item in the gallery we set the mode of the form to edit.

    We then set a variable to the current item of the gallery and then navigate the user to the form screen so when i head over to the form screen the form control has a property called.

    Item that i am setting to that same variable which is var item and when the user clicks on the plus icon to create a new item i am resetting the form so it goes back.

    To its default mode which in my case for the form is set to new and then i navigate the user to the form screen where the form control now is in new mode.

    And the key here is in the default mode property wherein i start with a new form experience now when we are deep linking into a screen and specifically a screen that.

    Has a form control experience we would like to direct the user to form screen to showcase a specific record that means open up an existing item in edit mode.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=Hrc51S2NgBo
Previous Post Next Post