PowerApps Deep Linking

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up everyone April Dunham here in this video I'm gonna talk all about deep linking within your power-ups I'll explain what deep linking is why you might want to use it and how to make it work within your power-ups all in this video but first here's the intro before we get started with how to implement this let's start with the what and the why what is deep linking well you take a look at the screen here say you are on your mobile phone for example and you click on a link but instead of going to your generic homepage of your app you want to go to some specific page that's what deep linking can enable you to do so without deep linking you launch something or click on a URL from your mobile device and it takes you straight to the app welcome screen you have to click in to find the screen that you're looking for deep linking bypasses all of that and takes you to a specified screen within your app and this can apply for mobile apps or desktop apps whichever so let's take this powerup that I have for example now if you're new with power apps as far as what your default screen is it's whichever screen that you have first in your list of screens so here I have about five different screens but the very first one is this welcome screen that I'm using to show what deep-linking is so since this is the first screen this will be the welcome screen meaning anytime anyone opens this app this will be the screen that they see but within this same app I have different screens one where people can enter in contact information so either enter a new contacts or edit existing and I also have a task entry form so what if instead of taking the user to the home page where they have to click on the buttons to get to the new task form or the new contact form what if I wanted to take directly to this contact form for example that's what we can do with deep linking this deep linking and perhaps is made possible with the per am what the parameter is it will read any parameter that you pass in via your URL now first let's take a step back and find how do we find the URL for our power-up well if you go to your make perhaps com page and click on your list of apps and then find the app that you want to get the URL for click these three dots and go to details this web link here is the URL for your power app now what we can do here is put in some additional parameters at the end of this URL to define where we want this app to deep link to so if we copy this here and put that in the browser now something new that they recently added to all of your power apps URLs is this tenant ID so there's already a parameter in here now all a parameter is is a way to pass in information to the URL that you're going to a parameter is defined at the end of your URL and your first parameter is to find with a question mark so for example if you're going to Microsoft comm and one of the pass in a parameter you can just after the dot-com put in a question mark and then you'll put in the name of your parameter so you look at this here there's already a tenant ID parameter being specified and a big long grid after that so to do our deep linking and have our custom parameters here we need to go to the end of this and we will put in an ampersand sign and now we can define our own perimeter so first we need to give it a name so since this video is all about deep linking I'm going to call my actual parameter deep link that's the name of the parameter that we'll need to search for in parov so now we need to pass it in a value but we do that with the equals sign if I was wanting to wrap the user to the contact form I might say deep link equals contact so now that I have this in my URL I can copy that put that anyway so maybe I want to be able to open this up from a SharePoint page or embed it in an email for somebody I will just copy this URL with our new parameter out of here this ampersand deep link equals contact and we can do some stuff in the powerup side that will look for this check if it's what that value is in here if it's contact move us through the contact page all right now let's jump over to power-ups and see how we can get that value and do something with it so we want to do this on the start of our application so whenever the power app is launched we need to check and see if that parameter value is there see what it is and based on what it is move it to the appropriate screen we define our actions that happen on start in this app section here and you'll see in the drop down one of the options is on start now I already have a formula in here so this is doing everything that I need for the deep-linking so first we just have an if statement and then in here that's where I'm using that per am function so you just type in per am open parenthesis and you just give it the name of the parameter that you're looking for in the URL so we put in deep link as our parameter name so it's going to look in the URL when the app is started and see if it contains this deep link option then we're saying okay if that parameters there and if that parameter value equals contact then we want to move to the contact form screen and our app to move to a different screen and your app that's done with the navigate function so you just type in navigate and then you pass it in the name of the screen you want to navigate to so if we look on the left hand side here I have a screen called contact form and that's when I want to navigate the user to if we have that parameter value in here next I have an else so if that deep link is equal to task then I want to navigate to the task form now if no parameter is defined in this case then it will just behave as normal and open up on this initial welcome screen which is fine is exactly what we want that's really all that's needed from the powerup side to be able to do this deep linking so the last thing that you have to do is take in your deep link URL with your parameter and put that wherever you want to launch the app again maybe you have a SharePoint site and you want to have a button to say add new contact here on SharePoint us have a button you know I'm going to paste in our deep link power app URL make sure you have that ampersand deep link equals now if I click this button we're going to launch the power app that onstart functions gonna load it's checking and look it navigates us directly to that contact form entry screen this deep linking capability can really come in handy when you're using power wraps with SharePoint now I don't particularly like building power apps by clicking the customize forms option in SharePoint I always build them as standalone apps so kind of like how I did here on this demo app I just went into the make it perhaps calm said new app and then pointed it to my SharePoint data source that way when you do that though you don't really have a way natively in SharePoint to get specifically to that app right so you could still with your interacting with this task list for example it's going to look like native SharePoint if I wanted to be able to click on a task and have it go directly into the app I could use the deep linking stuff that we're looking at now in combination with SharePoint column formatting with SharePoint column formatting I can click on the title field for example go to the settings and say format this column I can paste in a little bit of JSON here and this will actually make this column open up my power up so all this is really doing is I can put in the URL and my power up here so again we will take that URL and we'll put in our parameter with our deep link again we'll say deep equals in this case we want to go to the task screen and if I want this to open up for this particular record I'm actually doing two parameters so in any given URL you can have multiple parameters so in this case we have three we have our tenant ID we have deep link and now we're going to have an ID parameter so I can add it some additional logic in my app on start and check if the parameter for tasks is there and then also check to see if an ID is being passed in if an ID is being passed in then in my tasks form set that form control to point to that ID so it returns all the data so let's get this set up first alright we want this to open up or power up and so we'll just save this here and it'll apply our formatting now all we need to do is go back to our power app real quick so if I go back to my task form screen and the properties here go to the unvisible the honor app on start we already have that check to see if what parameters being passed in to tell me if I should go to the tasks screen or the contact screen once it does hit this task screen I want to do that additional check and see if I'm also passing in an ID because if I am that means that this form mode should be edit and I need to pass in the ID so it knows which item to pull and fill out in this form on the unvisible I can do that same kind of if statement with the per am but instead of the deep link we'll do ID because that was the name of the parameter we were passing in and our column formatting so we're gonna say if that's not blank then what I want to do is first set the mode of my form control to edit and not new so to do that we'll just say edit form and then we'll pass in our form here and that will actually change some out of the form so unvisible that will change the mode and if it is blank then keep it as the new form so now I'm going to copy this because we need to use them one more spot now we're changing our form so now I need to tell it if it isn't edit form which item to pull so that's stored in the form control itself in its items property that we have selected here here we can say if that parameter is not blank then we need to look up into our task list and find the record which ID matches the ID from the parameter that we're passing in the parameter values are being passed in as a string and the ID of a SharePoint list item is an integer so we need to wrap this per am inside a value function so that I will format it as an integer in the data types will match if you don't have it wrapped in a value you'll get a blue squiggly here and it will give you an error that the types don't match so make sure that you do wrap this in a value all right let's save this and let's test our SharePoint column formatting deep-linking here so here we are back on our SharePoint list now we've applied that column formatting on this title field and we've set it with our parameters there we're passing in the deep link of tasks and the ID for the selected item so if I click here on to this task for example of presentation for ignite notice how it's opening up a new window and this is opening up my YouTube demo app and power apps so it took us right to the task screen thanks to our deep link and it passed in the ID and pulled in all the task details for this specific task so just another use case for this deep linking capability if you found this video helpful please give it a like and subscribe and I will catch you in the next video [Music]
Info
Channel: April Dunnam
Views: 19,803
Rating: 5 out of 5
Keywords: powerapps deep linking, microsoft powerapps, powerapps tutorial, learn powerapps, power apps, microsoft powerapps tutorial, microsoft powerapps demo, powerapps tutorial for beginners, sharepoint online, powerapps for beginners, microsoft powerapps examples, microsoft powerapps sharepoint, powerapps demo, learn powerapps from scratch, learn powerapps step by step, powerapps param, powerapps parameters, powerapps parameter url, sharepoint column formatting, powerapps videos
Id: EZyxlYtzqTQ
Channel Id: undefined
Length: 12min 58sec (778 seconds)
Published: Mon Sep 09 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.