PowerApps Password Screen

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and today's show me how you password-protect a power app screen you want to have a button where only you can get access to it by knowing the secret code then this is the video for you we're also gonna talk about this thing over here new announcement oh but first here's our intro hi my name is Shane young with power apps 9-1-1 those guys and still those guys but don't worry well exploring the whole company differences at the end of the video first let's get into what you want to learn about and that is password protecting power app screens so in this video we're gonna do is we're gonna look at how to set up that password box when you some pop-ups to do that and even more fun is if they put in the wrong password we're gonna send them off to a waiting room for a little bit and punish them for typing in the wrong password that ways no one tries to power their way through it right I have security conscious even in our power apps so it should be a lot of fun let's just what you are to my desktop and get started okay so we're just open my browser and so here you're gonna see our app and so where I did in this video was I went ahead and built the whole app first because there's a lot of little moving pieces and I thought it would end up making an hour long video and I didn't want you to have to sit through an hour of me putting controls in the page and stuff but don't worry we're gonna go through every ounce of functionality and make sure that we explained in great detail how they it all works where does not gonna spend time adding buttons add in galleries and all that so before we doing that don't listen demo the app so let's do that the preview button and you also noticed that I as a special occasion made this app just about as pretty as I can make an app I've made some slightly prettier but this was really stretching it for me you guys have seen enough videos you know I make ugly apps what do you do you guys need to keep making pretty apps though okay so this simple app if you click Add customer data just a normal screen everyone can get to yay adding customer data home we save you customer data this is just a gallery screen same type of thing ringing browse through jump into people's records yay you can see my pretty face you can see for my wife I did a rudolph thing my dog that's a picture I haven't parent I want the Christmas team I didn't mean to do a Christmas theme that's what I did this is a image whatever lots of fun okay anyway back to home what you're really interested in those down here at the bottom I haven't traders only button and so even though you know with power amps is important now like if my data source was Excel everyone has access to that excel file so they could get in here they could go to the backend if they really wanted but sometimes you just want to screen that you know maybe you're protecting it because it's the you know finish this and send an email the results or something you know either think that was the last request I got and there's different ways you could do this we can have this button only be visible if users email was your email you know a lot of different ways but for whatever reason people want this password screen so we're gonna make a password screen so click on administrators only and you're gonna see I give them a little pop-up right and if you look down below there's a link to a conditional formatting video that's where I taught how pop-ups work we'll talk about how they work here as well but that's the boring long detailed version of how pop-ups work but so here you can see you know you can only proceed if you know the password do you there's a whoops button if you click whoops it just takes you back you know you don't want to get yelled out by me by trying to hack into my screen click on whoops do miss chairs only though if you put in the right password one two three four oh I just told you the password notice though I did the password mask here so you can't even see what I typed in will say about me in and there you go now you're on the secret screen if we go back to home and we say administrators only everything's back to start if I type in the wrong password I mean oh I thought you knew the password so we're gonna talk about how this works because this is different updating the text based on the condition so let me in again let me and again after three attempts we send you off to jail for 10 seconds in this screen there's no way for you to get off the screen other than a wait 10 seconds right in power apps that's there's no back button unless I give you a back but there's no navigate to home but unless I give it to you so that's a good mental note because it's important to remember that with power apps we don't have to worry about people seeing screens that we don't give them a way to navigate to and we don't have to worry about them leaving the screen that we don't give them a way to navigate off of alright so let's go look at how all this works and I can do a chrome even once to remember my password No thank you okay so add customer data this is just a normal button that navigates to a normal screen right view customer now it's a normal screen boring I'm gonna talk about that administrators only this is where the magic starts to happen this is just a little bit of magic and I found out a lot of people don't know you can pull this down and make it easier to read and so if you ever also wondering how do I format this because I didn't know until the other day peeled down the shift-key and hit enter that's how you add lines to make it a little easier to read okay but so here you can see when people click my administrators only button we're gonna update context right we're going to create some context variables and change their values so I'm gonna create one name pop-up and its values Izumi true or false it's gonna be a boolean variable message text you can only proceed if you know the password so one of the things that comes up a lot with people is like hey I want to have when I press a button I want to change a control I want to change the text that of labels displaying that type of stuff there's no way to do that in power apps directly so what we're going to do instead is we're going to create a context variable called message text we're going to put our text in there and then on my label I'm going to display the contents of that variable so then if I change the variable what's shown in that label will change so that's one of the things with power apps right we're gonna have to think about how do I work at this from the different angles that power Apps gives us and this is a great example of where I would use something like that we're also going to create a variable called bad password count and we're going to set it to zero so that way every time you go into the admin screen we're gonna give you three tries to hack it through and if not we're gonna do the mean things to you but bad password counts we've set that to zero and so then we're also going to reset the password field and just make sure we blanked out the password field in case you're in there before and there were still some cruft left right notice there's no navigate or anything because update context is going to set this pop-up value to true and if we look right here I took all those controls and I set the visible property not for the individual controls but for the actual pop-up group itself I set that to the value of pop-up and so a pop-up is either true or false invisible either takes true or false so not a lot of extra coding there just put the variables name in there because you made it true or false that's why you wouldn't want to say yes or no because it could couldn't use yes or no here than have an if if yes then true if no then false so you don't want to do that you just want to make those variables true or false okay so let's hit the preview screen because now I need to click the button to make the pop-up happen all right close back out so then now what we're seeing is the contents of my pop-up and so if we start at the bottom it's the easiest way to go I have an overweight image so I created a big grey rectangle and I said each transparency like 75 percent right we can just see that I did four there we did fill right so this is the color for gray and then the seventy-five percent so that's what makes that grayness pop-up so they know they're kind of still on the same screen the message box so this is just a normal label control and I set the fill to green I set the font color or not to green to purple I can't what do you do I set the font to white and then for the text instead of having something hard-coded in here like we normally do I'm just using that message text contextual variable that we just talked about and so right now stored in there is you can only proceed if you know the password easy enough for the password field this is just a normal text input and so in my text input the only thing special about it was I went ahead and set the mode and so the mode here is text mode password now by default when you add it it would have been text mode dot single line that bottom option and that's the default for a input field you could do multi life you won't let them type a bunch of notes who want kind of scroll bars and let them you know have some nice formatted looking text or you can do password and that's what turns all those characters in a dot so you couldn't see my secret password that I told you because I'm a dummy all right so that was all we had to do for that the button whoops in the whoops button all we do is update our context variable back to false so that would just make all this stuff disappear right so there's no navigate there's no changing thing just they click whoops change that variable all this stuff that is in this pop-up group goes away and then finally we get in here and so this button the Let Me In button this is where all the magic really happens right and also remember if you're sitting there thinking right now whoa Shane just went way too fast all that pop-up stuff that's because there's a separate video below that covers pop-ups and gory details so I'm assuming most of you have seen that at some capacity so I didn't want to go through all of that again nuts but if you're blown away by even the whole pop-up mentality stop this video go watch that one and then come back all right you're back okay so here we go and so I pulled this down so we could read this and I remember we use our control inners to kind of space this out you know if you've done any type of development for then tabbing and all that you've probably got a specific way you want to do this I just tried to make this as consumable as possible so let's look at how the Let Me In button works so if password field text equals one two three four that is my password one two three four that's all it takes right it's as simple compare what they typed in that text box to these numbers or letters or you know secret algorithms you got whatever you want them to have to type in you just put it where I've got one two three four and then we're going to do so we're gonna say if they typed in the right numbers or letters or characters whatever it is I'm into a few things we're gonna say reset the password field so reset the you know blank out the password field that makes sense we're gonna update our context I'm gonna set pop-up back to false so the next time they come to the home screen they don't see our pop-up screen makes a lot of sense all right in the semicolons is how we're stringing a bunch of stuff together right and then finally we're going to navigate them off to the admins only screen and look at that in a second but the eye man's only screen I'm just gonna use the cover function so that's what we're gonna do if they type in the right password and then this comma says all right so that was the true right this was the thing we compared this these three lines were the true and this comma says here's what we're gonna do if it's false so then this is where we got to think a little harder so what we're gonna do we're gonna update the context again but we're gonna change the message text to I thought you knew the password try again that's how we're going to change what the label shows us we're going to set our bad password count we're gonna use the sum function and so the sum function what you're going to do is you're going to say we want to take whatever value is stored in bad password count and so we know that when we pressed the button admin only we set that zero so the first time I type it in it'll be 0 and then comma which means plus so 0 plus 1 is 1 so now a bad word path bad password count is 1 the first time through so we're gonna do all that we're then write series we're semicolons another line we're going to reset the password field we want to blank it out again so that way they don't type in the wrong password over and over again okay that one's done and then when all of that is done I said that finishes this hole if so this is a little confusing like why I was looking at it I had remember what I did here but this parenthesis it's my space this way is this if is done okay done if it's done so semicolon so let's do something else and we're gonna do a second if after that if is done and we're gonna say if bad password count equals three right so if incrementing this we did 1 we did - we did 3 then we're going to say update context pop up equals false right so make sure we shut down the the pop-up menu some when I get back to the home they don't have the pop-up anymore and then we're going to navigate them to the screen that I so aptly named jail and we use a fade transition to get them there so jail is funny to me right because with my first like dog I had you know when I was in college he had a cage or I could you supposed to crate train dogs and so for whatever reason because we were done college kids we named his crate jail right the dog doesn't know I don't know what jail is so we just by go to jail he would go to his cage I was supposed to so the new dog chewy the one that had the big elf ears he's a good dog he does not have to be crate trained but the first dog for the first two or three years he's a little rambunctious in our apartment you know I mean College apart there's a lot of valuable stuff in there no there wasn't uh-huh we didn't want any all messing up the place when we're gone so he had to be crate trained anyway you don't care my dog's cage was named jail so that's what I named this screen that we send people off to ok so that's it that is all of the functionality that it takes to make this Let Me In button function right we got the what do we do if I put in the right stuff what do we do if I put in the wrong stuff if they put in the wrong stuff too many times then let's I'm off to jail so let's go look at jail so we'll make this smaller again because it does getting away so on the jail screen we got two could things we have a label so this is just where I have the text the first time I did the video the text was a little mean I decided to make it a little less mean so for the video there you know nice guy and then also hidden on the screen right now I have a timer control and we'll change that back to true and the reason I had it hidden was because I didn't want the people to be able to see it or click on it and you know they don't need to know you guys here for 10 seconds they don't need to see me counting down but what happens is with this timer there's a couple of things so visible true or false so we'll make it back to true duration this is how long you need them to sit here remember this is in milliseconds so this is 10 milliseconds so if you made it 60,000 that would be 1 minute you know I made 600,000 that'd be 10 minutes however long you want them to be sitting here because they can't leave this screen without you know completely closing the app all right there's no way for them to navigate anywhere cuz there's no buttons on the screen and navigate them away so then what we did we also made sure that the timer automatically started when you land on the page that way there's only 10 seconds and then finally on timer end we then navigate them back to the home screen so there's a separate video below on the timer control as well you know maybe you want to have a button here that says are you sorry and only after they click the are you sorry button does a 10 second timer start or you know maybe you want to do more complex things around counting how many times they've put in the wrong passwords maybe you want to make it bigger you know all of that's open to you because now you've got all the different controls that work for that but that's uh I think that about sums up ur app right so we'll sit here for our 10 seconds and I'll ramble while we do but hopefully this gives you guys an idea this password lock screen has been a real popular topic a lot of people have asked for what I love to know is I understand what you're using it for leave me comments below and tell me why you wanted a password lock screen what you're using for it I just like to understand business use cases ok I think that ties this up on that also offer real quick you know you don't have to listen this part but so if you're wondering about hope our apps nine-one-one so it's a spinoff of our friend bold zebras we've been getting so much demand from people with power apps where they want us to help them right whether it's 30 minutes of help or you know five or seven or ten hours of help to build their whole app so we actually spun off a separate company and that's the beauty of it if you just need me to get on with you for 15 minutes and do a screen share to fix that one drop down button like I did for the automotive guy out in California that's what power apps Taiwan one can do you don't have to do a big full consulting engagement hop long pay with a credit card you mean you will fix your app no problem so I don't know we'll see what happens I have I call into your new business ideas and it's just a spin off a bold zero so should be fun and I think that sums it up for the day so let me know what you think of the video and so thanks and have a great day hey it's me again if you got a second click the subscribe button that always keeps me making more videos or if you want to work together need some help getting your power apps going hit me up with power apps nine-one-one always happy to work together or finally if you're always looking for more videos that's probably what it is check out the power apps playlist over here and you know enjoy that alright thanks and have a great day
Info
Channel: Shane Young
Views: 40,403
Rating: 4.9060054 out of 5
Keywords: Shane Young PowerApps, PowerApps Password Screen, Shane Young, bold zebras, PowerApps911, powerapps, powerapps tutorial, PowerApps update label, PowerApps lock screen, microsoft powerapps, microsoft powerapps tutorial, powerapps tutorial for beginners, powerapps tutorial video, powerapps tutorial youtube, PowerApps 911, Power Apps
Id: GiN47Is_634
Channel Id: undefined
Length: 16min 41sec (1001 seconds)
Published: Thu Apr 05 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.