Creating User Profile Power App and working with the logged in User()

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how using only two functions very simply and quickly we can build a user profile and find out who the current logged in user is my name is colin kelly cook i'm an office 365 and power platform developer this is my channel where i share with you all my knowledge on everything powerapps sharepoint and office 365. please subscribe set up an alert so you know when my latest video is out and if you have any questions drop them in the comments okay so we're aiming for under five minutes now if it takes a little longer i apologize but believe me these are two functions that you are going to use all over and they are so simple it hurts so if you don't know these you need to get to know these the very first one quite simply we'll go to our app onstart and i'm going to create a new variable called user email and i'm going to call the user function now the user function gets three pieces of information for the currently logged in user now while i'm developing that's me but if a user comes to use my app that's that person so automatically we know who that user is and we can go and do a whole bunch of stuff against that which is amazing now i'm going to store the email because the email is going to be unique to that person and we're going to use that later on so set user email user.email let's just run onstart and let's just check what that's coming out with so user email perfect so we have the user email or my user email stored there so we know who the logged in user is now you'll notice when that loaded up it gave me three options it gave me full name email and it gave me image there's a whole bunch of other information that we can get with another really simple formula so we go to connectors for this one we need to add data and in add data we're searching for office 365 users so we add that in if we don't already have a connection it'll ask you to create one because i already have one i'm just going to add that in and let's drop this label down okay now instead of user email we're going to use office 365 users function which is part of that connector and then we're going to go all the way down to use user profile version 2 and we're going to give it the user email address that i've just pulled and we're going to say i want of that person's details their display name bingo bango there we go colin fluidsharepoint.com and colleen kelly cook now no profile card would be complete without an image so let's chuck in an image and this time let's use office 365 users dot user photo version 2 user email and there goes the call and there's the image and just for good measure let's chuck a border in there so there we go two functions loads of information there is a whole bunch more information in that office 365 users we can get direct reports we can get all of the company information job title all sorts of glorious information to build profile cards but look at that in under five minutes we've basically built a personalized app so we can even use that information to say okay when my user signs in or welcome [Music] welcome colleen kelly cook perfectly personalized experience now since we did that so quickly and this is probably going to take me over the five minutes let's um build a functional app with that so let's chuck a gallery in here blank vertical gallery and let's connect it up to a sharepoint site that i built earlier database dev my notes okay now i'm just gonna i've already added into this i've got title and note real simple um just in my gallery and chuck a label in here this is going to be this item dot note okay now i'm going to add a text input in there not in there i'm going to add a text input just under here and again it doesn't look great but we're only trying to work out functionality and then a button here that lets me add note okay now i'm not going to go through this and here but basically what i'm going to do is i'm going to patch the my notes with the defaults my notes and just to create a new record um but then in there the title is going to be the user email and the um note is going to be the text input to dot text okay so whatever i type in here and press add note it's going to go and add that into my thing and then we're just for good measure we'll do a refresh of my notes so that we've got the most up-to-date information on there hi the ho just need a semicolon at the end of that function okay so now if we play this app if i type something in here this is a new note and just add that it'll appear down there this is another note oh that is huge but you'll say well there's nothing special about that okay that's just adding stuff into a gallery however if we go over here i'm storing the user email against that now what i can use is a single database let's edit this in the grid view add a new item and put in dave at fluid sharepoint.com a note i don't want to see sorry dave but that is of no interest to me so now if we add another note in here just that we get that refresh test note 2 just make sure we've come out of that so that saves and add note now i've got dave's note in there but that's not what i want so in here we can now filter my notes where title is equal to user email and that's always going to be the logged in users that's going to change every time someone logs in so when i log in i'm only going to see my notes if i log in or dave logs in he'll see his notes so that probably took more than five minutes not far off but we've built an entire profile and a personalized experience for a database now i know someone asked me a very long time ago how can i get that from an excel spreadsheet exactly the same process you just need an identifier in the excel spreadsheet that identifies the with the user their id their email is always going to be unique so i would generally go with that and then you can create this personalized experience and only show people the information that relates to them hopefully that was extremely helpful and hopefully you'll find some amazing uses for that and can think up some pretty cool power apps so go out there get creating um and look forward to seeing you again in the next [Music] video [Music] [Music] you
Info
Channel: Novalogix
Views: 22,605
Rating: undefined out of 5
Keywords: Microsoft, power platform, power apps, apps, user profiles, user profile, profile, user, user(), Office365Users, Office365
Id: Mprnw6ZT3WI
Channel Id: undefined
Length: 8min 20sec (500 seconds)
Published: Tue Mar 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.