everything that you wanted to know about the gallery control uh that's a pretty tall order isn't it Kurt right should should have put but we're afraid to [Laughter] ask so what be afraid to ask go ahead sorry yeah but okay so what all are we going to cover today um so we do have an outline here uh we're GNA be going over a lot of Basics tips and tricks um so something came up this week uh dynamically adding new blank rows um we thought that would be a good thing to go over inline editing is a a big request how to do inline editing so if you're familiar with working with a spreadsheet I mean you've got rows and columns right and you can have rows and columns within a gallery well why not just edit the data right there inside the gallery and that commonly is called inline editing so we plan on going over that today as well um and then also d data binding Kurt what would you define as as data binding when you're directly hooked into the table that you're trying to look at right so yeah yeah and I don't know there's we'll go there later on about it but there's a lot to talk about with that yeah well the first thing that pops in my head is you've got a gallery on one side and maybe you got a bunch of text boxes and things on the right side I mean that in in a way sort of data binding but um I think that's a uh an item that we were discussing and we might go uh various ways on that but that's the the first thing that pops into my head uh using the gallery instead of a combo box I absolutely detest uh combo boxes for for many reasons and you know we could end up creating our own type of combo box uh have you ever had a field where it's pretty much a single line of text right but um it might be departments or uh things of that nature and then let's say we've got uh uh a new department or maybe departments is the greatest uh example but um you know there's there's probably a good choice of of of a few things um and you might want to add a a new item to that you know in a choice maybe you got like a drop down and you want the ability to have them add a new item so we could do that with a combination of the gallery and make it look much better rather than it just sort of like popping up and disappearing all the time um although we could do that as well so I'd like to sort of cover that today and dare I say within that topic right there you know there's only so much you can do with the controls that are existing there but you can create with that Gallery control you can make that control look a lot different and you have a lot more control over what goes what gets seen and how you how you look at it you know um compared to just the standard uh combo box that you have yeah absolutely and of course we have the links um at the bottom of these notes now I'm going to actually share this link with you guys here in the chat okay so you guys can sort of follow along now the uh the notes aren't updated in real time um I have to hit a publish so this this list in this outline will change over the course of the live stream at the end I will do a publish and also I plan on making the MSA file uh available for download as well so if you guys want to get it that you can access that and then once I upload it somewhere I'll put the link in there as well so uh let's get started shall we all right so um why why is this such an important control to master um one thing that I I said Kurt and I were talking this morning I'm like it's like the most juice for the squeeze as far as if you're going to like m you know just two or three controls within power apps I I'd say this is one this is one of them you know and then Kurt you said it is the central portal to all your data sources I like that you would you like to expand on that Amy yeah so instead of having to paint you know you could just imagine if you were trying to get a look at your data sources and you were trying to do this one record at a time think of all the labels and Tech and uh text input boxes you'd have to have whereas if you've got uh this this gallery and you can just put your label and your text box in there and it's going to repeat those items for the whole the whole data source so you're you can actually view your entire data source you can make your own data grid with this Gallery you know so it just changes the whole way you um you you you design your screen right so uh you're actually looking at that that Gallery is your window to your data source and you can control the view based on what you're putting in what what labels you put out there and what text input boxes or toggles or whatever you want to put in there yeah yeah um you know one thing I would say is um let's consider all the the controls that we have at our disposal within power apps um that hold records of um you know a set of Records okay so you got a combo box you got a drop down list you have the the gallery you also have the data table you have new modern control which is like a a grid I think they might be calling it a table control um what are are there any other controls that I'm missing here Kurt well you got your drop downs and your list boxes you know those those do that um you know yeah so an entire data source but none of those have the control that you have in a gallery that's right I I rarely see anybody use a list box in Power apps isn't that weird I I try to do it once in a while just for Nostalgia you know what I find whenever we use any of these other controls um I think this is called a data View and then a grid I'll say this is a modern control I'll have to verify that's the name of it out of all all of these now the grid is is uh the new one is pretty cool maybe we'll take a little sneak peek on that and maybe have a completely different video session on that but out of all these whenever I use now the drop down list I use quite a bit yeah I don't use list box um every once I'm like you know this this is something simple I use a list box and then it's like it's almost like a a drop- down list that's permanently open right exactly for those of you who' have never used it um because we use that a lot back back in V the VB6 days right the the golden days for for uh CT Darren um out of all these it's like the gallery is the most flexible most awesome control that you have to reach for within power ABS it is so flexible I I have never seen a control in any language be as powerful and flexible as that Gallery control I don't know to me that was the whole reason why powerups was the big draw to me you know was that Gallery control yeah yeah absolutely um galleries man it's so important so hopefully you guys see why this is so important um and you've got reason to sort of stick around and watch this whole whole session um and what I'm going to try to do um it might take me a day or two but not only will I have a full transcript of this whole video but I'll I'll put chapters in there and try to have the chapters broken up so you guys can skip around to the part that you're just looking for but I didn't encourage you guys to watch the whole thing I mean I mean a matter of an afternoon hopefully you could say that you've mastered the gallery yeah I've seen I've seen in recent days I've seen people still using the the combo boxes um and tying themselves to that and then I've also seen people just not even use galleries because they just don't know the power of it yet so I just really feel like this is a really important topic for a lot of people now some of you guys might have been using this gallery for the last five years you know and and you guys are pretty good at it already but I just still want to encourage you guys to look at this because there might be some some cool tricks and tips Darren showed me a couple cool tricks and tips that and I thought I was an expert at Gallery but then when we were just talking about doing this and and Darren's going through it he was showing me a couple things I didn't know about so you know I I think you're gonna pick something up in this if you watch this yeah I'm looking I'm looking at the uh the comments here Kurt So I amoma says I yeah I I used to I used to use it for one to many forms I would use 20 of them oh my goodness gracious that sounds a little wild and Mike says good morning from Boston good morning me you uh guys all of you that uh come to the the live stream and guys I I I sort of want to welcome uh probably the the mass majority of you who are watching this on demand because you know we might get uh 200 views on the live stream but really what eventually we might have 2,000 um so really the mass majority of you are watching this uh you know on demand later on maybe a different day than today I just want to welcome you um and we are live on Tik Tok um so that's what I've got this thing up here I keep looking up because I'm sort of monitoring the the Tik Tok um actually I've got a comment here um so Stella the diver I've mastered a gallery but typically users want more need to work out how to do drag and drop yeah it's coming yeah yeah it's coming it's coming um so I've got powerups here on the screen um and what I'm going to do is um let's you know I'm gonna add a a new screen to all this and let's just talk about adding uh galleries to the screen just in case you've never done this before so I go in here now that they've restructured this menu system I typically just type in what I'm looking for I mean they've got it categorized and I never want to go through and and try to figure out okay where's the gallery is that display no is that layout you know I I just Gallery oh look at this here's all the Galleries and we have six to choose from okay so um what I'm going to do is sort of categorize these so it's really two categories you got vertical horizontal and flexible height okay and and then you've got the three versions but they're blank and I always recommend going with the blank you might think Oh blank that doesn't sound good but what happens is if you add I'm going to add the vertical gallery now do you want your rows to go U down you know up and down that's vertical of course right horizontal is left and right so I'm going to click vertical which is normally what people uh want to work with and and see so here we go and it added a bunch of stuff I'm going to open this up a little bit and what I should do is make sure I'm at 150% so everybody can see everything really nice and big on my screen okay and uh I'm going to go into this gallery that you see off to the left side we have two shape controls so one is this little rectangle on the side so if I change rolls you see that little line goes with it I guess that's sort of cool um yeah so you've got that and then you've got this separator now guys I'm going to show you what I do with Galleries and it's going to completely eliminate the need for such a control okay and uh it was probably one of the big you know I've been working with power ATS for uh probably about a year until I come across somebody uh came to me with their gallery and they were they're having a problem with it and I looked at it I'm like what how what's going on here and then I figured out they they set two controls and they had the these perfect grid lines and I'm going to I'm going to show you that in the tips and tricks uh portion of this video of this session here we have a arrow icon okay um now guys if you stick with this format your app is gonna look like a power apps app is that a good thing or a bad thing I I don't know I don't think it's a good thing I mean I love power apps and I'm not trying to say anything bad about power apps but I don't want my apps to look like a power apps app you know and I think that comes from people just you know uh what we call them the low code no call code people that are just like trying to learn how to do this thing they're just they're using fors or whatever and and uh they just don't know how to do it things in a different way so they just they just throw stuff in there and let power apps do the work for them um but if you do the work for yourself your app is going to look like your app and not a power apps app you know yeah so years ago I I used to work with this open source project called nuke I actually wrote a book on it you guys go to amazon.com search for Darren n you'll find my my book that um is not a bestseller it's not a bestseller uh but um I liked it I liked the book I thought it was great um but one of the big things and the book was about theming getting your your net nuke site to look exactly how you want it to look or your client wants it to look right yeah and I never wanted my net nuke site to look look like a net nuke site because it sort of had a cartoony clunky looking UI you know if somebody saw my app and let's say we've got two responses uh one is oh wow this looks nice okay what is this and and people almost excited to learn about your app right or you've got another one oh yeah that's definitely a powerups app you can see it right you can see it hey Darren you mind me showing you something that I kind of was playing around with you me to kind of look around on some stuff I was playing with while while we're here when you're looking at this could you go to the transition property I want you to see this this is kind of cool I I I never I'm really glad you asked me to go look for these things because um I would have never done it and now I'm really liking it so change that to pop okay instead of n put pop now run run your program and go navigate around there see how it pops up as you're going through now you it kind of you miss a little bit because it changes things to bold but you can kind of see as you're moving it pops it up oh as I'm hovering it's it's moving that around that's really cool now change it to push oh and it goes inside goes inside instead of out it's kind of a cool effect man yeah we were going through all these properties of the gallery like okay what do we want to cover what don't we want to cover and the properties we didn't want to cover is stuff like border color you know every control almost has a border color so you guys need to uh but whenever um okay so push um when I came across this transition it said pop and pull or whatever I'm like oh this is assembler Kurt you go research this he saw pop and push and said oh this is assembler stuff Kurt go look go look D I sort of like this I love it now imagine now this is kind of a bad I mean it's a you got a sample data going here but if you had your controls out there and you had your colors going like you do you know you're selecting it which we're going to do here in a little bit that's going to be really a cool effect man yeah so we have a list of vital properties and um let's put in there so it's um what's the name of the property again Transit uh golly what was that transition sorry transition is the name of the property yeah so transition so I want to yeah transition. push um so transition is that what us programmers would call an enumerated value so if we say transition we got three choices none pop and push so default the none yeah so the default is none um so I'm I'm GNA put that in here I I would have never looked at that unless You' asked me to go check it out you know yeah pop push I'll put the first one there none and we'll say that's the default okay so as you guys see on the screen the these are the different properties we're going to cover in this session here um so that's cool you you found that that's awesome um now what I'm gonna recommend guys you never don't ever use these now if you use them and they work well for you and you like them that's great now if you're a beginner I'm going to say don't even mess with them because let me show you what's gonna happen first of all what's gonna happen you'll bring this Gallery here and even connect it to your data source okay what it does to me it may not do this to you but it sort of like squashes all my creativity in trying to make this look really cool uh does it do that for you too Kurt or is it yeah it does it does and and plus you're spending most of the time trying to fix what they put in there to change it right instead of just putting it in there right the first time you know yeah um so one of the first things I want to do is well this this road doesn't have any type of images or anything so I'm going to take that out okay what happened well now there's this blank screen uh this Blank Spot um and what I'm used to and I'm a little surprised it didn't happen here if I take this one out oh I didn't need that one control what happened here now I've got errors to figure out idle 2x what's that if you're a beginner this is this is sort of not not not the greatest you know so uh when whenever you add a gallery type that in here again yeah they're they're looking at that and they're saying where's my python at go let me get back to python here or Excel your Exel yeah did you just say xell no I didn't but maybe it sounded like that exhale we're exhaling that was a Freudian slip inside my head um yeah make sure my Tik tok's doing okay here uh looks like it is okay so I always say focus on these three now how do you make the decision between these three well do you want vertical or horizontal that's pretty much what comes down for for me um now I want to talk about this flexible height Gallery hold on a second hold on second Darren there's something that I must say because you've told me many times this is a Darren ISM here nobody likes horizontal Scrolls no nobody nobody likes horizontal Scrolls so I just have put that in there man nobody's got time for that no yeah so if I go in here and I have it horizontal and let's say we got a bunch of Records now I I sort of came prepared Kurt look at this I got some custom stuff over there and my app. formulas oh wow I create this thing called sample data oh wow okay what's our s well we don't have any controls so this is what you might have to deal with if you're working with a a blank Gallery well you don't have anything you got a blank slate or a blank canvas right so the first thing I do is I just add a label at least to see what data is in here so I'll click on label okay what what is going on here and another thing I I do right away with a gallery is I go over here and change the Border uh thickness to something other than zero and you see these items go across um why would you ever want to do that I mean I mean I like the flexibility of it because like oh I need to do I need something to repeat across across and like oh you know what I need to do some type of a tabbing that's what I use it for yep you want to create own tab control or in the rare case maybe we'll get into that later on for the advanced stuff when you're doing nested galleries sometimes that becomes important in that too right absolutely you know what Kurt I want to capture all these little gold nuggets okay um so I'm going to say the what templated galleries don't Rec go mend okay and then I'm GNA say I'm gonna do this and then I'm going to say uh blankies we'll do this boom um and perhaps we we should talk about um yeah the horizontal uses dab tabbing should I have two bees in tabbing yeah where's Jeff where we need him um and then you mentioned um nested galleries yeah nested galleries very good very cool um I I would say probably used most at least by Me ge wiiz yeah almost so here's a qu I've got a good question for you here Kurt let see if you can answer it for me what flexible well why wouldn't I always flexible sounds like a good thing why wouldn't I want flexible all the time I it's a lot to manage right it'd be a lot to manage if you were gonna do that you know I I actually didn't know anything about I didn't even understand the concept of a flexible Gallery until you showed me there was a use case we did we were working on this big project and it was the only way to get something done um yeah I I don't really don't know how to answer that question Darren why why wouldn't you want to do it um this that that's a this is a good day because I'm Scooter's about to uh uh show you something cool here sometimes I'll say Kurt get ready for your mind to be blown uh okay so we'll see we'll have a vertical which is one that I use the most let's let's put a little border here and then on this one that's flexible let's also put a border there to and we'll add um a label we do that and we'll add a label here you know what I'm going to do um so the the size of each row or cell within a gallery is determined by a property okay I'm trying to click on one not I I hate this little popup um template size that's what determines it so over here we have a template size um of 280 so I'm going to go over here and set this thing up to be 280 okay I'm going to run both of them um oh I sort of like this this you know that that looks nice doesn't it it it it does as long as you're uniform but it starts looking choppy after if you don't if you don't so this thing dynamically sizes based on what's visible in that in that template okay what is a template the template is something really that that you want to grab on make sure that you understand what a template is in the context of talking about galleries the template is what's going to be repeated everything you put into the template so right now um for both of these we have a label right here right um and everything and over here we have we've got two labels everything inside the template is being repeated the template is what it's going to take and can I can can I put some other words to what you just said there Darren real quick because I think that's an important point when he says when he's talking about what's going to be repeated think about your data table that your your Source your database table your SharePoint table um every every record is going to be repeated it's gonna it's G to show it's going to repeat for each record in that item so when you set up that template you're setting it up for the one time this is what every record I want it to look like and it's going to repeat that thing that Rec for every record in your data source I just wanted to put that out there because um I remember when you were telling me about that I'm like repeating what are you talking about repeating and then it just finally clicked on me you know but so yeah whatever data source for every record or Row in that data source that that template represents one row uh within the table of values right y um so what I want to say on this flexible height is it's going to shrink down to everything that's visible within it and you may not think so until you run it and then it does it so just wanted to uh you know let you guys know about that now what's great about the the um the flexible height is you can make everything invisible on a particular row okay so right now we've got four records this Gallery is based on this thing called custom Gallery sample and if I click on that downward Chevron it's going to show me the data that's inside okay so this is the data so we've got four rows here and um let's say inside of this you want all of the odd records so perhaps we could we could write some code to take out the number we could do we could use a function called right so a right function takes a string and we could just grab the last character in this uh lipsum type of text and grab that one two three four right and then we could do how do how do we figure out an odd or an even uh we do a modulus right divide by two and then if we have a remainder we know it's odd and then we could base the visible property of everything inside of that set the visible to false and then that row would just not be there um that's what's so cool about the flexible height now so I'm I told you about all the upsides to the flexible height what are the downsides okay um let me go to a screen I have prepared okay it's this screen and um my data source I think I've got like 5,000 records in here and what I'm going to do if you look off to the side we have something called wrap count okay so let's say we got a lot of what we have here on this screen is we got a we have a lot of data you see this little bitty scroll bar oh my goodness this is wild right we got 5,000 records here and something else you'll notice is we have this Blank Space right here so we have enough space to see two records at a time per row and that's what we're able to do with a a a regular Gallery we can go to the wp count and we can go two oh look what I did there what I did there 1 two 3 4 so that's sort of nice so we could display more than uh one thing within a row now these are distinct two different records okay but you can't do that with a flexible height that's the drawback with it I like the flexibility of having that and while we're talking about the W count you can go up to 10 that's as far that's as high as you can go okay so if I go back down to my flexible height what we'll notice here look at that that property is not there I click on this one boom look wrap count CLI on here and there is no wrap count so that's the big thing to keep in mind you might think oh I'm getting something really cool with a flexible height but you use that flexibility nice so we have a a question here by uh sham how can we add new data here in gallery from SharePoint we're gonna get there we're GNA use SharePoint as a data source here in just a little bit so just hang on we're gonna get to that we're gonna do some really cool stuff with uh going to data here with it absolutely so um I'm G to go back to this screen one as we're stepping through some more of these properties um so this was just a regular blank vertical gallery that I added now had just changed it the W count to two I could change that back to one okay so we could do a little bit of compare and contrast now this one here on the right this is the regular vertical Gallery not a blank one and um what I wanted to do was sort of look at what these little separators look like if we hook this thing up to some data okay and I can tell you right now I already like mine better than the default [Laughter] one all right let's go back to our uh so uh Kurt I know a lot of times you're waiting for me to finish my my thoughts so if you have anything to that You' like to add anything I've said in the last five or 10 minutes feel free to uh I I I've I've uh I've been just using the uh interrupt Darren in the moment to to add my stuff and I I do want to say that I'm real proud of you about the modulus operator you know oh really you know it's funny because a lot of people don't like to use that they don't think about it you know but it modulus can be used for so many different things my favorite function in math is the modulus operator you know yeah you're really good with with um there's a lot of things Kurt if I didn't have you as a mentor I probably would have never known about random you know randomly generating numbers um you know going from VB all the way to um you know power apps like what would I use a random number for well I definitely know that um cool so what we don't have um it is nice and flexible so Rick Rick says he was told there would be no math so now we're gonna offer your money back Rick now yeah also Rick the the sales guy might have also promised you there' be no code in this low code no code right there is right yeah that's great they told it they told us there would be no code yeah the rap count Okay so we've gone over that um so I'm ready to start talking about these vital properties uh guys and um we'll be adding some um data here in a little bit let's talk about the first thing that I typically do um I guess it's not really a vital property but the first thing um it is a Darren it's a vital property to Darren how about that yeah it is and what I want to do is just focus on the properties that other controls typically don't have these are the these things are typically uh specific to the gallery but almost every other controll has a border right like uh a text box or almost any of them but for sure that's what I do when I get into power apps and I add a gallery in here because as you see if we go to I I I think I did it on every single one of maybe except this one you notice like we got this measle spot here this little red dot and uh and it's like what what am I looking at what is this and that's how I feel about a gallery until I give it a border so now I come to this and now I'm not like so confused all I have now is like okay there's a there's an error here let me you know set that to zero I guess yeah I almost wish they'd put that out there by default right set the border on by default but there might be a good reason Rick Rick says that's why my apps are that's what my apps are missing the math a border code or math math says you know I'd have a great app my app doesn't do anything why doesn't it do anything oh math oh okay oh I gotta I gotta make it do math yeah so what I end up doing is I go over here and I set up at least probably a two um on the border and you might want to give some thought on the border color now in my template that I use I have a theme you know dynamic theming setup and I tie into that for everything um so I just set a a border of two okay and the uh properties I wanted to talk about so that's the first thing I do the let's talk about fill and template fill okay that's what gives us the grid lines okay so if you look at Microsoft's Gallery just out of the box you drop it down here they put in this little separator and I wanted the separator and and until I I found out about the dealing with these two properties I would always be having like a rectangle sitting there that's sort of giving me a grid look and feel to it but until I came across setting up these two properties um that's when it sort of clicked for me so I'm going to set the um the fill or the background color it's called fill and power apps okay I'm going to set that to a nice gray color like a medium gray is typically what I go with not too dark not too light um okay now after we've after we've done that I always go over here to the side and I scroll all the way down and it used to be at the very top but it's in the t's it's called template fill and U an RGB value of 0000 Z is actually black okay uh and if you wanted white you have to say 255 255 255 but this zero this is the transparency okay so if we wanted white now we can actually just say color. white that's nice huh oh look at that I sort of like that I see what you're doing okay so now we have grid lines and it doesn't look that's why you that back I used to do that I'm like Dar why are you setting that background and I do like the light gray because it kind of goes with everything and and uh I don't know that's pretty smooth man I like I used to wonder why you did that but now I understand so I'm GL I'm really glad that uh invited me to this live stream so maybe there are a few things in here that you you see me do that uh we got the chance to sort of like unpack and look at yeah exactly so this is what I did to create my own sample data Kurt I I used your uh sequence function I call it your sequence function because you taught me a lot of things about that I didn't even know there's multiple parameters you can pass in here you can I had no idea about that I was like oh wow I'm G say FX theme mean gray like my gray okay don't you love the app. formulas place we just put all these pieces of code here that we can call instead of putting the app on start um and then for the B the Border color I sort of want it to match that same color so instead of the theming we G say effect theming gray so so Darren you're gonna have to go back through because some of these users are going to wonder what what the heck did you just do so go back to that forall statement and just kind of walk that through one time just real fast you don't have to go for a long time on it sure oh you know what I should probably make us a little smaller Kurt we're not we're not the starters of the show pars is y that's exactly right all right so here we have the loop and what what would you like to look at here so you're doing a you're doing a sample data and you're doing a forall and you're sending all that in so what where where are you putting that into your um so each record you're setting that up into the into the sequence table is that what you're doing so the sequence function gives us almost a table value or you can call it an array okay so we have a bunch of uh rows there and we have a a column that will give us a value of numbers okay so within a a forall function you could say this record and it's going to reference the individual item that we're traversing look at me using big words right now you could have done an as my there and instead of this record you could have used your Alias right I could have and and when he says my it's just any any name you want to give it yeah my and a lot of times what I found is this record sometimes power gets confused with it it does it can't handle good these very well at all yeah L of times I'll do that that my there and then a lot of times like sometimes like FX my blue or my gray uh if if you're hurting for a a name to call something while doing an app just call it my this or my that um something I use a lot now this is new I've not seen before Darren you're using that custom Gallery sample that you created you're not doing a patch here you're not doing any kind of patch you're not doing any kind of anything in here this is this is good stuff here what are you doing how how are you getting that information in there yeah so what I'm doing is I'm looping through 5,000 times and sequence allows us to do that okay now if I say my do value so the first one's created will be a a value of one the next will be two three and all the way through um and then I wanted some text in here as well okay now in order to describe what I'm doing I want to show you what what we have here um if I go to a different screen that actually has the default lipsum values hey look at this here's the default value of a gallery custom Gallery sample and you go in here and it's got some uh lauram ipsum text both in a short form and a long form and what I want to do is I just want to get that text I I probably should have just typed it but I could get it the sample text over here and it could be longer you know and then what I did is I I just took off any numbers because it does one two three four and I just wanted to get it that so the whole thing that I'm getting at by doing all this first and and whatever is I just wanted to get that sample heading and I wanted to um take out the number like the one two three four and instead just use my value one through 5,000 and put that in there what do you think of that I I I love it because you're not having to use a collect or or a patch or anything that substitute would put that information in there yeah Patty love says like math for the bouncing ball that's [Laughter] funny D David says brilliant uh morning from New York morning to you all right so uh Roger says how can we buy and show multiple SharePoint lists oh my goodness with four or five uh common columns data in a single Gallery okay collections do it join yes so let let me answer this in the most simplest way hopefully in about 30 seconds here if you want if you have all data from different sources that you want to display in a gallery um the first thing you want to decide you need to zero in on one of those lists that you want to have represented for each record being displayed okay and um so that's the first thing and then when you're inside the record uh the the template remember we talked about the template you can refer to these other collections with a lookup or a filter you'd use a filter if you're doing a nested Gallery but if you need to do lookups now I I strongly discourage people from using lookups filters any type of database transaction like going to a server um to get the data within a gallery and but there's an exception to that if you know it's only going to be a very small record set there's probably not going to be much of a performance set and that's why I discourage people is because that could really make your app very very sluggish uh and and very much not scalable so um so one exception is there's not much data so let's say you've got a SharePoint list out there and you've got a list of 20 departments that's probably no big deal what power apps will do is it will bring over all 20 departments and every time you do a lookup it should be it should be working with the inmemory um representation of that table okay now the ultimate safest way is to use an in memory collection by using stuff like collect clear collect okay and or like a a variable or something you set up here in the app. formulas because it's right there in memory powerups doesn't have to go off to some some other server um some SharePoint or uh SQL server or data verse even um it's just right there in memory and you're not going to get much of uh a performance hit or waiting time to go get the data now if you've got 5,000 records uh you know you got tons and tons of data you might be using up a lot of memory but um you shouldn't be getting the the performance hit you know um of course yeah Roger has a second an efficient way without using collection well you you you took away the uh the one thing that um of of how I how I do that so if you want an efficient way then what you want to do is create some type of a view you have views in data verse and you have views in SQL Server now you do have views in SharePoint but um I'm not I I've never been able to pull in a view of SharePoint in as a data source I can do that with data verse and SQL server but that's how I would um do this if you're going to tell me I can't use a collection then you want to do joins within a view okay and then you pull in that view as a data source and that's that's how you could do that and that would be uh fairly efficient okay and go ahead go ahead and finish what you're do sure Roger says there's going to be lot of data in each of those more than 2,000 okay uh I'm G I want to be honest with you Roger I would I mean without sort of derailing the the whole live stream and and um going into your situation I would really caution against that what why is there ever a reason to display 2,000 or more records on a screen I don't know I mean you're going to make your app sluggish right there whether they're in memory or in a database uh I feel I I would typically want to sort of filter those down somehow you know so what what are your thoughts Kurt I I agree I unless he's just talking about um there's there's going to be 2,000 records to sift through but right you would filter those down and then bring those in um if you can it tells me that there there's maybe something more that you can do with that maybe not maybe you got a A really unique use case but most of the time when I've got 2,000 records or more there's something I could filter to knock that down just a little bit more um you had a great great example um one of our accelerator students was talking about needing all these different counties in the in the in the country and there's well over 2,000 countries or counties in this country right so um but so we're looking at well how do you do that well Darren says uh put in a zip code or put in a state what how many counties are in that state there's not 2,000 in that state you know so you can if you narrowed it down to the state now you can just get the counties for that State instead of that you know so it's just a little bit of creativity maybe you can do it that way um absolutely I I definitely like the idea of using a collection and and creating a join within that collection so that you could join multiple tables within that um and and it's absolutely doable you can do a join right inside of power apps you know you can't do joins within power apps what are you talking about Kurt that's what they say that's what they say but you don't listen to what say we can do it Darren um you blew me away uh with this module you have for the accelerator students talking about collections you do so many wild things in here you found things that I you know collections is array Collections and joins you started talking to me one day about three-dimensional arrays I'm like what are you talking about man I I mean I can sort of think about them but what what and you did it you you did it and you did it well thank you that's fun that's it was it was awesome too you know um I just like to go you know when you show something just like what can we do with this thing let's go play with it and figure out what we can do you know um I want to go back because there's a point I I don't I don't want to derail the whole live stream I like what you said there but I want to go back to that code block that you just had right there because I was still I was hung up on why are you doing this without a collection why are you doing this without without the patch and I'm just dawned on me what you're doing okay so so that that sequence is creating a table okay it's actually creating a table a small one dimensional table of views and the the four all statement returns every function returns a value well what does the four all statement return it returns a table so you're actually creating the table within that sequence within that for all and and you're taking the return value and you're putting that in Sample data so you don't need to use the table function because you're not you're creating the table with the return type of the for all that's the Magic the Return of the for all is the table I love it that's the first time I've seen that code and I think that's just really you know you you you you done some Pebble snatch in there bud I'm just not gonna lie to you I think that's pretty neat stuff I don't know if if you guys are seeing that um May and maybe I'm just like sometimes you know I get hung up on the littlest thing but that is amazing to me right there okay you did it you did a you did that without using a a collection or a patch yeah my goodness and yeah for each iteration in this Loop we've got I'm I'm using a curly brace I'm like let's see if if I can just put a curly brace in here so I'm creating a record by putting these little curly braces in there and then inside of the curly braces I'm I'm pretty much creating my uh you know my record type yeah you're Crea record right there inside of the sequence or the four all the four all sorry um yeah I'm I'm impressed I really want to take a look at that and and break that down a little bit more on my own so okay want to make sure we put that somewhere where I can get a hold of it I'm serious I really like that and I think that there's some more work that can be done with this okay very good you guys just seen something that was just very unique and not talked about much and see he was just gonna just go oh yeah know it's just I'm just doing this about it and and I'm like going oh my goodness look at what he just did I'm I'm Gonna Keep A a running uh list uh of the reasons why I need Kurt on the live streams Slow Me Down go into things that I think that are like yeah everybody knows this you know right no that's great man well you know you've you've played with power apps a lot you've been working with power apps you are a power apps expert there's no doubt about it and so yeah you know it's like you for some of us that are still we haven't had an opportunity to do all those things we know what the what the the normal stuff is but that stuff right there that's a pro tip right there that's a straight Pro tip yeah oh people pay big money for that Darren do they yeah all right so back people pay big money for this you stole my thunder Kurt you stole my thunder that's funny stuff so uh we don't want to derail the show anymore here so let's get back on track with what you're gonna do here yeah yeah I'm trying to I'm trying to get through these vital properties and I haven't quite um done this thing yet uh so the fill so trying to do grid Lines within a gallery so we did that by setting up the um the color and if you click on color there you see that's it's actually called Phil I hate when when powerups does that it calls it one thing over here like data source if I click on data source oh up here now it's called items well why can't you just pick with one and go with it right so yeah you set the fill and then you go to template fill and I did white there and that's what's going to give us our grid lines okay look at that now it doesn't look too elegant it's almost too thick uh in my opinion however we're getting there okay yeah and um a number that I like to go with and you can play around with this and decide what you or your uh client or customers like I like to go with a a template padding of two as the most and one as um the the least there so it looks a little nicer there just uh you know two pixels instead of five five is the default okay so um are we done with this uh you know what I I'll do is I'll I'll duplicate this first screen if I ever do make a big edit to a screen I'll always sort of back it up like that I'll be back in just a moment there okay sure so I'm gonna expand this a little bit okay zoom out a little bit okay so we set up those two columns and we also modify the template [Music] padding fill template fill and template padding need to set up those three properties to make the grid lines look right there okay now let's talk about items okay well you're going to have your data source in here okay um so you might be using SharePoint list data verse I'm just going to say uh yeah data verse table um SQL Server table we could have all kinds of different data sources we could have collections okay so I should probably do something like this get this right um so this is just a few examples we could you know last last Saturday we looked at creating our own Outlook our own email client using the Outlook connector that was pretty cool well guess what you can use connectors other connectors but if you think about it SharePoint is actually a connector data verse is a connector a SQL Server um collection that's going to be in memory but other connectors like Office 365 Outlook I think is what it's called but it could be all kinds of things so you could put that in there right now I'm using an in-memory collection okay so there was a question like Hey how do you set this up with SharePoint okay so if I bring up my SharePoint here I I did have a quick question I didn't know if you wanted to answer that before that or you want to go ahead and do the SharePoint thing first does it have to do with data sources yes okay yeah sure what you got um can you put in the square bracket can you put a square bracket at array in into a a a gallery and within that can you formulate a record within the square bracketed array what was the second thing formulate a what a record you know the curly braces can you differentiate can you put curly braces inside of that square bracket okay yeah so let me show you something something that I learned while so if you'd be able to to um you know what I'll do is I'll just put it in here because there I've got quite a bit to say about that okay and I want to finish my thought before I go into that so data source I'll actually put in here an array and what I'm going to say is oh yeah square brackets and we could say um say yes no and then maybe you guys ever seen that in power apps I like it so if I add over a dropdown okay now that I now that I've added it my my U outline I won't forget about it so um I'm going to go over here into a SharePoint list and pull in typ of data raw data might be good let's use raw data so in order to add a SharePoint list as a data source you click on data over here off to the side and I'm going to click add data and they're trying to get us to use table so these are all data verse data sources um that of course they want you to use uh data verse but go into connectors and then we'll go look for share Point okay there's SharePoint and um I'm presented with four uh which is sort of a weird thing these are all the same I just always click on the first one okay and there is my SharePoint list now let's say none of these are the SharePoint uh sites that you want to access okay what you want to do is click on this little square which will take you to the default home page or UR URL for that SharePoint site you copy it and you paste it right here okay I'm going to click connect now that will immediately take me to all my document libraries that I can connect to and all my lists nice so I'm going to go down to Raw data and I'm going to add it and there we go um now I'm going to make a copy of this screen because I'm about to make some uh big changes and um so for this data source we click on data source and we can just say raw data just type it in there and what you may have noticed is that we have a data source here and we can go into these dropdowns and you can pick one I don't like to do that because a lot of times you want to add to this and if you click on this downward Chevron you'll be able to look at the data okay I love that I love that downward Chevron I love it too wow I lock it all out so what I'm going to do is I'm going to make this label a little bigger here okay so we can see more of what we're working with okay so to answer um the question that that came across how do you add a SharePoint list well that's that's how you do it so the person that that asked that I need to go up there and maybe find out who they they were here um and uh so if you have any questions about that please let me know um so here's a question from Patty which is Darren can you show us how you set up the rgba in formulas well absolutely absolutely okay so um I'm going to go up here to app formulas okay and that's what this is right here okay so the rgba function it takes three values okay so the first one is for it goes RGB okay R is for red G is green and B is blue and you can pick between zero and 255 for each of those okay and with those given three color values you can come up with almost any color that you can imagine and then the fourth one is the opacity if it's transparent or not uh zero being fully transparent one I'm sorry one being being fully trans being fully visible and zero being fully transparent you can give it a percentage and it will be half of that or sort of see-through okay so that gives us a lot of flexibility so go ahead finish with your sorry I was I was just gonna ask Patty I'm like hey is that does that was that the answer you're looking for or was there something more to that that question all right go ahead Kurt yeah but yeah Patty definitely if that's more if you need more to that but I wanted to to say now that we know this now that Darren has shown this for you accelerator students and I see that we have a few of them out here I want to challenge you guys into making a function doing passing uh is it gonna be a theming like for for your different kinds of theming if I want this kind of theme or if I want that kind of theme like you got theming blue theming gray we could put that into a function and return which one we needed um and I wanted to challenge you guys to just take Darren's example and maybe make a make a function out of that yeah that's interesting I like it Picasso Picasso all right so we've added a SharePoint data source there okay so we've definitely got that let's go back to my my list here and let's talk about this array thing that you brought up Kurt this is great stuff and I learned this by um I don't know where I saw this maybe it was I think it might have been a radio button look at this nope it's just radio sample I don't know where I saw this but this is what I saw somewhere and I'll share it with you you could create an array with square brackets okay and it's it's telling me it's going to be a table value okay so you know how curly braces denote a record square brackets denote a table okay and what we could do here is just give it some values of um yes no we could have a blank value we could have a maybe yeah and some people like well I want the first item to be blank you know I want to know if they answered it or not okay so let's let's go look at this drop- down list got a blank yes no maybe okay I didn't have to use a choice field which I I recommend never using a choice field never never I'm I'm going to create a video and it's going to call never use a choice field never never and it just G to be me and Curt and say never just don't do it and then we'll explain it and then we'll say never again it just just on that topic it blows my mind that we say that so many times and then we come when people come back with their projects and they got all these Choice fields in there I'm like what are you doing and we might get the question well okay so let's say there are things that you you that Curt and Darren always say never never never and I see Mike says never um so here so here let me put it in this context um what about a lookup column Kurt should we say never use a lookup column yes or no uh in in SharePoint see there it is there's the question when we're talking about lookup columns in SharePoint boom never ever use them now what about data verse no that is what you do there there right always always use lookup in data verse yeah never use lookups uh I'm sorry with a never Ed choices lookups it depends okay a lookup it depends uh on the data source okay if you use a look up with in uh SharePoint you're gonna have delegation issues and stuff but data verse and SQL Server you don't I I just want to take that one step further whenever I come across an existing SharePoint list that has choices I go to the trouble of adding columns and pulling that choice value out so that I can look at it I do not want to even look at it inside that yeah I would to it's a complex type and I recommend sticking with your simple types as much as possible now look look at what we did here Kurt we've got this could be a choice a choice column yes no maybe but it's here in the app what I would rather do in the database in the data source I would want to use a a column that's just single line of text and one of these values only always be one of these values and it'll just be displayed there you know if you want to force somebody in the app to pick one well boom we've just done it it's like well what happens if somebody goes to the SharePoint list like no don't don't let anybody know about the SharePoint list you're using as a database you never want people going into the SharePoint list and editing the data that's bad bad bad that's bad you yeah I just want to say something in there um because I knew you were on a roll and I didn't want to stop it but so so within that I want to say that you know you with with your data sources it this goes along with the the rules the business rules keep your business rules inside of the app not inside of the table okay like you know like a lot of times with records you know you can have business rules within each record with each each field you can have a required field or you can have the you could put business rules inside of them never I never do that I always do the business rules inside of the app I make my required field my requirements be from within the app I have control over that it's the same with this this follows that same rule right so you're going to control the choices not not the table you know yeah I mean somebody could go in and change the choices in the in the SharePoint list if they if they have the access to do so um and um yeah so let me know if you guys have any questions on that we recommend never using a choice um and with the lookup that the lookup type of columns we're talking about before it really depends on the data source right how do you do a lookup type of column in SQL Server you don't there is no column type called lookup right okay that tells you anything now you can create a relationship and which is essentially what you're doing in in dataverse when you create a lookup column you're creating a relationship between two teames and you're you would sort of be doing that in in SharePoint but SharePoint was not designed for power apps uh and I don't know that it was designed to be used as a a really really good data source either you know it's just there to to be easy for um lay people to go in and create a quick list to hold some data and I would I would say it's it's better than using a spreadsheet you know yeah yeah but um and then how do you you know working with Choice Fields how do you set up a choice field within SQL Server there is no way to do a choice field within SQL Server you just create a separate table so your data is going to be more portable this way right if you need to move it between things if you just put it in a single line of text and keep it away from the complex data types and you later on somebody wants to take it from SharePoint to SQL Server it's going to be a lot easier uh Port than it would be if you had uh complex data types yeah you know um one other thing I wanted to say in that really quick before you moved on from the square bracket sometimes you'll see this this is a perfect one right here yes no maybe you might see that field I like to use those in drop down list box that Darren just did right here you might use that in a lot of different places within your app and instead of having to type that all out if you're G to if you're going to put those Square bracketed hardcoded values put that if it happens more than one time put that up there in the formulas and just give it a and give it a name a a value name you know instead of having to retype that out every time for every drop down list box okay FX yes no maybe yep it looks like it works I like it having my stuff in one spot like this this is great so instead of doing this Kurt and having it repeated everywhere and if we want add an item then we have to add it in several places and that violates our dry principle does it not that's right that's right which is dry don't repeat yourself probably most important rule yeah yeah so it still works okay that's good um now I do see a question here by David what is the simplest way to implement lookup columns in SharePoint no don't do that I I think what he's referring to is the lookup columns in dataverse like the way that we do it in data verse what's the simplest way of doing replicating that in SharePoint and that is there's we have entire videos on that I think would be the answer to that I don't know yeah so um look up columns are fine and data verse in my opinion they're they're not so great in SharePoint and I recommend never using lookup columns in SharePoint so the simplest way to to to implement a lookup column I mean there's only one way to do it you just create a column and you know column type lookup that's the simplest way of creating a lookup but I'm recommending you don't do that now there might be a second thing that I think Kurt was alluding to is like okay well if I want a relationship how do I do it then you know and it just so happens to be that I am a relationship expert out on YouTube I don't know if you guys know that or not if you do a search for relationship advice and put in Darren you're going to get all types of relationship advice uh on YouTube look at that this is the video that I recommend checking out and I show you how to do it in SharePoint and essentially what you do is you're G to have a numeric type as a foreign key and you put the ID from the from the primary table into that field okay you know Darren you talk about relationships so much you should have your own afternoon TV show I think once a week is probably in all that people can hand handle of me right yeah um so Jan says what's that Rick says some of the relationship advice is about power apps even yeah oh that's funny that's hilar I and I did share sh a link to that video I was recommending there uh in in the chat uh very cool all right so um did I did we finish all of our thoughts about lookups and choices um because these are things that come up in live streams that you know I'm not I don't have like a video just about hey don't use choice or how you should use lookups and all that type of stuff so it's sort of cool that it comes up here and there like this um what I want to do here is this data source that we created for the yes no maybe what you asked me Kurt is hey could we use that square bracket stuff as a data source in a gallery and look at that well look at that yeah it works fine and you could probably delineate records inside of those each comma too right so you could probably have separate Fields inside of that too if you needed to if you wanted to go if you want to go crazy yeah so so you're saying we could add additional so if you don't give it see down here we said ID and title we created our own record and our own collection here by doing that ID and title those are the two things that are there well what is this well if you don't specify any name of a column what's it going to do it's just going to give you a default of one value value right so let's let's take a look at this so this is like that so if we're going to indent it properly that's what it would look like um so what you're saying is we could have more than the so I think at that point if you want to specify more at this level right here you're going to have to start using curly braces if you want to start defining more Fields inside of and that's what I was asking can you do that can you create curly brackets at every comma and have different records in there if you wanted some other information in there I don't know what you'd put in there in this case but you know my title let's do that this is very cool yes no do you know you guys know you can drag around code so you can select some code that you want and then just drag it over and it'll move it some people don't know that I learned that back in the back in the day when you were teaching me so look at this um I guess it needs to be in double maybe I didn't drag it right quite right there we go and now we need commas between our records one yeah okay so I believe that is how you would do that yeah so if I go back to the screen here we're using this I mean our labels messed up it was looking at Value before but now what do we have my title my title look at there so there you go that's how that's how you get it done and I would recommend guys to I mean you saw that how simple it was before I recommend always doing something like this because it's just a matter of like an hour passes as you're working on a screen or an app and you're like you know what I need another field in there because you might want to filter it based on or you know sort it by another column like sort order I mean there's all kinds of and it would be much easier to add things to it if you had set it up like this okay abely so you saw how you can do it really simply but you can start making it very complex and and flexible that option but the nice thing about it is it's consistent all these different things the the curly braces everywhere is a record and the square bracket is everywhere as a table you know I I just think it's great yeah sort of is yeah uh AMR says gosh he taught me relationship so well now I can't do it from the back now I can do it uh from the back of my head that's awesome I love it okay Kurt what's our next topic here so we set an arrays uh you know I call those arrays but as you saw when we I selected everything within the square brackets it actually said table okay U also a table with square so we got that we added in a SharePoint list well that could have been a data verse table SQL Server table that we bring in a collection so on and so forth okay so we' talked about how to add a data source okay but these are the other things that you might also want to do they're in the data source for power apps so if I click on the gallery look at items there is my SharePoint data source but maybe we only want to display a subset of those maybe we want to do a search a filter so just sort of keep that in mind um that that that is a very typical thing um one of one of the big questions at a beginner level that uh PowerUp students really wrestle with is like hey I've got my data showing on this screen and I only want them to see their data I don't want I mean if they saw other people's you know salary information or something that would be really bad it's like well you need to filter it you know filter it based on what they should see and you should have a column out there that sort of determines if they should be seeing it or not right so um I'm sort of curious in here who is if you look at it simple way of of do doing this is say created by okay now look at this this label doesn't like it well this is a complex data type a complex data type you've got like a a you know it's not simple you got to use another dot to get at other things okay so let's look at display name who did all this Daren well what we could do I'm copy that so if you want people to only see their data this this might be a good example of doing so yeah I'm glad you're doing that because there's a lot of people that don't understand you could put the filter right inside of the item's property yeah absolutely so the first parameter for a filter is the data source be a collection it could be another filter function it could be another could be a search function anything that returns a value you could put in there that first thing then this filter function where you filter whatever you give it there and then the second parameter is the criteria by which you filter things out okay in this case I want to see uh where the the created by email I like that better because because there could be two John smiths in a large organization yeah so I might say something like Darren at I'm going to get this email easily by because I don't know what it um what I'm using as an email in this environment I I can that's not what I wanted sometimes organizations will have multiple email addresses for the same person so you want to tie into the email address that power apps picks up on okay so we're going to use the user function and say email I'll run this this is a text box that is my email address for this tenant and you don't want to ever misspell something so that's good that we copy and paste rather than try to type it okay so this should only give me my data any uh what is the main field over here for raw data I thought it was title so if we go down here to a RW data okay we're probably gonna see a uh okay look this was a an Excel spreadsheet remember CT where we took somebody's Excel spreadsheet from the the uh the free power apps learn community and they're like hey turn this spreadsheet into a a power app so we did it this is the data from that so if I go into a list setting let's go find out the it's a bad name for a okay look do you see what I see down there it says title down there below title yeah so make sure hold on say what he's looking at there you go okay you're doing you're doing it yeah so look what he's looking at he's looking at the bottom left corner of that grid down there the bottom left corner of your screen shows that if you look at the very end of it that's covering up our heads right our heads are covering up right now the he is it's okay you do really good daring at this it's amazing how fast you can get around and I throw stuff at you all the time and you're just reacting to it so so look it down at that little black uh line black background with white text at the bottom there and at the end of it it says title that's what he's looking at he's doing all that work to get to the actual name that SharePoint recognizes that's a that's a pro tip guys people pay big money for that I I mean uh you don't think to look there but that's the first place he looks yeah especially when I I start seeing spaces and slashes and whatever and at the very top if I don't see a title that tells me right there somebody changed the title and I never change if if dat Source tries to give me something I'm like give me whatever you want to by default okay so in a SharePoint list always tries to give me a title I might set it up to not be required you know and I may or may not use it okay I'm never going to rename okay so here's a never never never that's my rule too that's my rule too yeah inside of SharePoint this specifically SharePoint never ever ever ever ever ever ever ever never ever ever change the name of a field ever oh my goodness that'll kill you yeah because over in in power apps you'll say oh this is the this is the of my column so you might copy that and you go over here and you're looking for that okay you may or may not find it but if you say title now it's gonna it's what's funny is it didn't give me it on intellisense that see that's the weird thing that's another reason why you never want to name it um you're like well if you had okay so it's oh s okay so if I go in here most of the time it will not give you OHS now now it does do they fix it Kurt I don't know it might have just after like five years or whatever it's been like that and now they're gonna I think it's still inconsistent because I I came across it the other day maybe it's depends on what version you're using I don't know well look what we have to do here now Kurt because we have spaces because we've got a special symbol like a Ford slash yeah now we need these single quotes all over the place and look how long it is yeah that's that's another rule too I don't like to use spaces unless you came up with one reason that's the only reason is a model driven model driven you need spaces if you're gonna do a model driven program but but yeah that's also data verse too right yeah yeah um which in data verse you can rename things um but and you can put spaces in them um but but yeah dataverse uses those um but there's a lot less uh emotional trauma that you'll go through with renaming and other data sources SharePoint you know yeah don't do it so um so I'm referencing the title here and let's go back let's sort of refresh what we're talking about here we're talking about what we want to have in the items property the data source we've done a filter um we can do a a search and assort was I about to share something and oh I was just talking about how to filter base on the user and then the label was for some reason there was one thing I wanted to say if you could go back to that filter real quick okay yeah um I just want to make sure that everybody's on the same page with this when he says criteria and I know you guys are gonna say yeah yeah yeah but when he says criteria that means whatever that evaluation is it's going to it's going to return a true it's going to result a true uh result it's going to come up with a True Result okay whatever you put on that comma after that so you got Rod data and then you got comma and you see you got a left and right operand with with with the equal sign that that that criteria that's what he calls criteria that must result to true that's what's GNA return in fact he can replace that whole thing with the the term true he can just put true there and and it'll just return everything right but it would but that's the point I wanting to get at is you got to make that a true that that's got to result to a true uh outcome now you could say not to make that equal but it's going to be whatever is false that'll be true if something is false and it right yeah so I'm putting some good comments there so the first parameter is of the the second one is the criteria yeah if if I I just said true in here if if you want to just comment out your your criteria maybe it's not working right just put true there it's going to return everything if you put false there it's not going to return anything so this is a Boolean value Boolean is a yes no true false type of value yep and that's what it's looking for now the data type of created by well that's a complex type so we have to say email that gives us a single line of text how do we you know we're comparing two things how do we get at what what is it that's returning a Boolean and actually learned this from you Kurt this little thing right here the equal sign or a greater than less than you know there's there's quite a few of them they're called operators the op the equal sign operator is what's giving us a Boolean value it's either equal this or it's not equal this that's right so if you're wondering what kind of thing should I put here well you need to come up with the Boolean so I love the fact that you brought that up needs to be a Boolean value for that to work very good anything else add of that Kurt um well just one more thing since you said what you said so that equal sign that equal sign operator in the deep dark recesses of power apps what what returns a value what returns one value a function remember that a function returns one value so the deep dark recess is a power apps that equal sign is actually an operator function it's actually it's actually a function you know that we you know we just see the left and right but that's true that's interesting I like it just trivia okay so now what I'm going to do is I'm gonna duplicate this screen because I'm GNA start ripping things out that's ripped out I don't need a drop- down list yet this all the way across um all right so we we covered that now I didn't want to make the make this video about search and fil I mean filter is the most used thing that you're going to do with that data source and then what I recommend that you do sort on the very end okay and you also have sort by columns now you can Nest all these these functions filter search sort but don't think so sort you can only sort on one column and I sometimes I see people using nested sort thinking that they're going to sort on this field and then it's going to sort on this nope you can't do that I did that I did that I didn't understand that you couldn't do that right then when you said that I still didn't agree with it I said let me think about and finally it dawn on me oh my goodness you can't do that so uh sort by comms is pretty important pretty it is yeah uh so if you want to sort on multiple comms let's say we've got um a large organization um and we've got all the the employees in there or even customers and we say Okay I want to look at the list and I want to want them sorted by their last name okay and and those two fields are separate sometimes people put them in there together and that's not granular granular you want first name over here and the last name over here because you might want to do separate sorts on that but if we want to sort and we've got like a thousand Smiths well within that how do we want to sort well then we want to sort on the first name okay in order to do that you're going to use that sort by columns um and you on all kind of stuff if you didn't and you try to do a nested sort you would sort all the last names but then you would just get another sort of all the first names so yeah doesn't do anything yeah so uh here if I said sort I could try to search on when it was created maybe there's created that's a date time type of value and then I'll say I want to see the most recent records at the top and go down into the past as as we move down so I would say sort order. descending okay and then let's say a bunch of Records have the same like they were created on the same day well then I might want to sort on something else I'm going to click on format text and it messes messed everything up didn't it so I guess I'll have to do my own indentation here okay there we go so instead of of building like doing another one for another column you'd want to use sort by column so I just wanted to mention that um let's see here so that's the item so guys if you have anything that uh any questions over that topic please let me know in the in the the chat there trying to keep an eye on on everything as I'm going along Kurt are we ready for the default property this is a vital property go ahead V and it's and for me it's the hardest one to use you gotta you gotta make sure you you know how to do this this is good stuff right here okay now I sorted this on a in a in a weird way so it's all jumbled up right but um okay so in order to talk about default okay there's something that I want to do here and it's a little bit of a tip and a trick uh to and it will sort of assist us explaining the default okay and I do this with almost every single Gallery I use so I've got the gallery selected in the treeview and I'm going to go in here and go look at the template fill now we already set the template fill it's white yeah okay but I want want to do here is use an if statement okay and what I want to say is this item do is selected if it is selected I want to say color dot light yellow I already know that's the color I really like for that okay look at that isn't that pretty so now when I select a row you can see that it's selected and if it's to if if uh maybe you or some of your users might be a little colorblind well what we could do is we just take that light word out of there and then it becomes like really obvious which one is selected right so we just covered at least two other things here okay so before I talk about default we really needed to understand um we've got this item so I'm going to cut that put that up here now the this item keyword within power apps I go back to my formula this item this item is a keyword that you can use within power apps and that's going to reference the item that you're currently on okay and that doesn't mean selected okay what I could do like if I click on let's say this this first record here for a moment you see here on this label says this item. ID that doesn't mean like I could I could click on a different record and this this item each record will have a this item that's being referenced it just means whatever record we're currently on okay so for each record here we're displaying the ID so that's what the this item is used for and the only place I've seen this item you used is inside of a gallery within the template this item now what comes after this item well you're going to get at all of the database fields that the gallery is based on okay that the template is based on with an addition of one more Pro one more thing called is selected that's something that power apps adds to every data source that you bind to a gallery so keep that in mind is is it selected now with the gallery only one that only one can be selected uh now I was hoping that we'll have time to go over how can we have multiple Selections in the gallery because it's it's possible but we've got to do a little bit of an outof the-box thinking to do it you know what I mean yeah um also keep in mind there's there's another property in here called something like allow what is that multiple selections right selectable look at this selectable there's a property called selectable and you can change this to false which means nothing's going to be selected now I didn't know about this until we started looking at this now think about that that's pretty good you can actually control keep the user from selecting things if you need to yeah is that cool yeah so if they were to click on this it would do some type of database operation or take something that would that would take five minutes you know let's say we got a a button down here and if you didn't have a spinner on top of this you know and if they're clicking on all kinds of different stuff they could be making the app crash to be honest you know so in that case you might want to use that now how I found about it somebody brought their app to me like hey this isn't working and I'm like I couldn't figure it out and I'm like what is going on here and I found this selectable what is that oh and they had it set to um to false I'm like oh and then it fixed it so that's forever etched in my mind that that's there yeah um so we've got uh this item and say is selected okay um Hing not to repeat anything here well we do have gallery. selected um but this is um a little different is selected okay so this item I should say here refers to the underlying record in question not necessarily the selected record or row okay um it's in effect on every single row to be honest okay so this item. ID is what the the um example that I used to display that okay so that it refers to the underlying data so we could say this item. field name then we have the um is selected that is off of this so this item dot we'll get these two things but there's a third thing in here Kurt can you think of anything else that we can access with this item um you got is selected you got selected well okay so let's uh that do selected do this would be the whole record right okay yeah if we're inside and and I know that you know the answer to this because we were talking about this before so when we if we're inside of the template or we're inside of let's say a label or something and we say this item dot we can get at the data we can get at if it's selected or not but there's a third thing and it's huge that some people don't even think about you know so so if you were to n name your label something that was meaningful you would be able to say this item do meaningful name so I could look at well talk about meaningful unmeaning full names label you know um yeah so the the this item I'm going to say is selected just for a moment and and also I'm G to make a copy of this label okay so we're inside of a label and we've got this item and we could say is selected like we did on that other thing so true false right and then we got all the fields which we've seen but we also have label it's not allowing me to reference that now this item do selected dude this item do selected well this item is referring to the template so um see there's no select now now if we're talking about a gallery a gallery has a selected property right I think that's what we're we're trying to do can you put the gallery name in that um give me give me just one second here let me add in because this is actually this is something I use all the time yeah toggle and maybe we want to use this toggle for something we can make it invisible but I want this toggle to be dependent upon this label okay so let's get let's do what you you mentioned lbl uh selected okay so over here in the toggle I can set up the default property to be lbl look at that now it's giving me oh now it's showing me these controls is that funny lbl selected so now I can reference a but I didn't do this item okay um so I guess the this it you can reference that within the current row but the this item doesn't do that try to try to do the gallery name right there just just just just to appease me okay now what do you want me to do do selected dot now do we have La yep there it is do text equals true now realize this is a um a toggle and it's it wants a Boolean value right so what were you what were you trying to to do here um I thought you were just trying to reference the the the name I thought that's what you were trying to do the reference the label well the problem with that is when we say gallery. selected it's only going to give us one and it's going to be the same one for all the records oh okay you see that I I'm sorry I didn't know that that's what okay I didn't understand your exercise um so if you want to reference something within that row then we'll have to just say label text equals true there you go you see that and if we had reference gallery. selected well we're always going to be be looking at that whichever one is selected every time um now what I have done with this is you could have a for all that will go through a gallery and we can reference uh the controls inside of it you know right now one one thing we could do with that too is we could do an add columns to the source and call it uh have an is selected column in that and then and every time you click on the selection with your toggle it would change that source to is Select and then you could say this item that label would equal this item do is selected if you want that that would be kind of cool uh controls can be ref referenced but not with the this item so I'll make that distinction there okay so we talked about is selected now I wonder if we can talk about default um okay I've got an idea we've got IDs here so let's put in a text input at the top and we're only going to allow them to put in numbers here and I'm going to say 0 0 and there is no record with with a zero in it okay but that's what will make the default so I'm going to click on the gallery and we'll go to default now what is default the default property is the record or row or or template instance in that gallery that you want to have selected for the user by default you think that was a good description how would you describe it because I want people to really understand this I I I'm not sure what you were saying really yet don't okay okay so I was a little confused by it okay so we need to give the default property a record okay and a lot of times what I have in the default property is a look up I just want to give it a single record okay that's what we so I'll say look up what do I want to uh search for well I don't want to go do a lookup on the whole data source because inside of that Gallery we might have a subset of the full data source so what I'll say here is gallery one.all items so that's going to give me a result set it's going to give me a table value rows and columns in inside of that gallery that are being displayed there okay so that's good so the first parameter of a lookup is going to be a data source or a table value like that could be a collection the second one is going to be the criteria and what I want to do is I want to get the record that has the ID of whatever number that was input by the user up here at the top so let's give this a meaningful name we'll say txt ID to select okay so I'm going to grab that name now and I'm going to say dot text that's the property within the text box or the text entry now ID is numeric value it's an auto number and this whatever even though they're typing numbers in a in a text input well that's going to be a strin so in order to turn that into a number because if we don't turn it into a number um see it says incompatible types for comparison well we need to put value there so let's go ahead and run this and I see there's one called uh that has an IDE of 52 so I'm gonna say 52 oh look at that what do you think of that Kurt I love it I love it what's really cool about this is if you were on another another screen and you are changing uh you were changing something on another screen you need to go back to that with that value you could go back to that default and use that default absolutely and one idea that you had today Kurt was to cover deep linking this is where this is something that you'll need to know if you ever do deep linking I don't want to go into the topic very much there but we could set this up to look at the parameter that was passed into the app and we could automatically select that record um so I've got a I thought this might be uh fun to do Kurt we got a slider here and we'll for the max we can set this up to be Gallery one do uh what record count um we have all items count there we go y all right now the problem with that just want to throw that out there is the all items count is only going to give you what how many's been rendered it's not going to give you everything that you've selected in that gallery yeah so you have to be aware of that yeah that's a that's an important distinction there Kurt I'm I'm going to document that okay so let's talk about items count could be used but only going to wh going to give you the count on the rendered items not necessarily all of them so typically a gallery will go it will actually be displaying the first 100 it's almost like it goes gets a 100 at a time so in that case if we had you know several thousand here and we try to reference all items count it's only going to give us a 100 perhaps okay um there is one exception to that I found if you make the gallery have the uh you know that wrap count uh we could have more if you're displaying more than a hundred on the screen at once without any use of scroll bars it will go ahead and get I don't know if it gets the 200 or or if it gets the0 or whatever to actually give you the all the data to be displayed there um so a question I have about that Darren is if I were to scroll to the bottom and then back up to the top would it give me would that be the the it would it change the amount that got rendered let's say if I had a thousand records in there and I scroll to the bottom would that be the way it works I I believe at that point um if you you sort of force it to to render it all so for example if I go to screen three I'm going to go back in time until we have the data where we've got a lot of data right and what I'm going to do here to sort of find this out give you the absolute truth the value of of how this is handled I'm going to get the name of the gallery I'm going to go in here and say gallery. all items count it's giving me 5,000 now I'm wondering because it's only displaying nine but it gave me 5,000 could be Memory because it's I'm sorry what could be a memory thing too because you don't have much in the memory right there right that's what I was about to say yeah because we're using a a collection there maybe it's it's rering at all but yeah if you scroll down to the top and if you're working with with the data source um I I I believe that you're practically forcing it to render everything yeah um I don't recommend displaying that much data on a screen for a user no yeah okay so if we were going to do this um the way that it's always going to give us the the true uh value um we've got record count and we'll say all items okay did I do that right does it count count row very good and that gives us 79 so let's go back to that screen um and and try that just for a second here so we got 5,000 what happens if we were to uh use count rows [Music] here um and I imagine since I scroll to the bottom it's going to give get us everything um so I'll say all items is 5,000 maybe we can um unload and reload it and see if those are both the same later um all right so we got the max there and what I was going to say we got the slider instead of having them type something in there we could go into the default and say slider. value wouldn't this be cool you know how in Access you've got this thing where you got like okay give me the next the next page of like you're P Ponting through the stuff or you say hey go to the end you know yeah show me the the so you sort of creating your own scroll bar in a way if this was sorted um ascendingly here let's go to say ID and we'll say a sending so now it's sorted I I click on this and we got a lot of data in here this would be an easy way instead of like let's say you don't want to use a scroll bar you can turn the scroll bar off guys of the gallery it's called scroll bar so you could turn that off and effectively have your own slider here and you're like well I don't like a horizontal uh slider well go in here and change it to a vertical and then put it on this side of the gallery you've got your own little scroll bar that maybe looks nicer I don't know you tell me does it do you like this better than the well you got you have control over what you want to do you can control the step and everything else you know how far you want to scroll for each time you move it sounds kind of cool it's kind of neat I like to have my own one one of these days we'll be a you could build a component and have your own uh scroll bar in it you know yeah absolutely um so Kurt do you feel like I I uh or we covered the default proper uh the default property properly I have one question that that you did not answer and that is um what happens if the lookup returns F doesn't it returns a blank what happens then does it just go to the top and if it can't find it that's a that's a great question um so let's let's try this out um well of course the slider is always going to be give us a a value that's valid but let's say on the max let's add one to it so I know there's one value there that's not going to be valid at all so I'm go all the way there so you see that I set it to 80 and there's only 79 in there it's going to select the first one looks like to me so could you could you go to the sixth one and click it click the sixth item real quick and then put in the number uh oneou 10,000 in in the uh text box label there that you have because that you had that set to that didn't you where you could put it no no it's set up to the slider okay okay but going to 80 would be the same thing as 10,000 because there's but we could I I wonder let's say 10,000 there does that have any effect so if I go all the way over to 10,000 it's still G to give me that first it goes up the top then okay very cool um oh this is an interesting question here um it's a little off topic but it's something I can answer quickly and do you have any resources for power apps that can help me walk through building a Gant chart with galleries isn't that a uh an interesting question there Kurt you know D David's online with us um today and he would know what we're talking about because basically that scheduling thing that we did for him is like a Gant chart isn't it we could build a Gant chart the same way right yeah that's kind of smooth man so guys if you go to my channel and then click on the live tab which one was that it was tracking tasks with time boxing and that's effectively what what we came up with there what's funny is Kurt there's only 818 views you think people would uh really like that because that's type of material that I I don't think you you see everywhere you know no no but and you know really that time sheet isn't exactly a Gant chart we could build we could make a video on that one day uh we should maybe do a video on how to build a Gant chart which just putting values in there right um might be kind of cool I'm going to try to go to the end and sort of show you what we came up with at the end here and uh it was near the end I I think there for a while you were wondering if if I was going to come up with something that was actually G to work or not uh you told me that I I think there was one place in here that yeah yeah definitely we were struggling with the um the thing there you did a good job coming up with it though I think you were throwing me on the bus a couple times in there too what yeah I'm not a bus driver um oh look you're you're you're applauding me there that's when I knew I did something right look at that elv Elvis was applauding me too and the crowd was going yeah uh I am somoma says could you show linking to galleries absolutely um where are we at in here uh we need to we need to get through this Kurt where yeah I just I just want to put out there real quick that in our uh PPC videos we have some really good uh video content about the conditional getting into Galleries and selecting and toggles um so like because Amber was asking to walk through that again and I just wanted to point out that um we've got some really good content out there in uh PPC yeah absolutely Ely and if if you guys uh are wondering we did a live stream earlier in the week called something about 7:47 so we're actually running a special where we include a laptop as well as the ticketing system of course as well as the jump start kit you know I said PPC and really this isn't uh yeah it's not personal protection or anything it's personal pocket coaching is what it is um and what that is it's a video in your mailbox every day and it's and it's co covering covering some topic on power apps and programming like power apps so yeah absolutely so we got the default we're usually going to use a lookup there we've talked about all items count gallery. selected okay so this is where we're going to start um linking to the gallery okay so I'm going to go back to design mode and try to zoom in and out here so I can work with this a little better and you know this is this is a in a great transition here Kurt because we could just add in a a text input here and we could allow them to modify values and then have maybe have a button here that will patch it we could do that okay so um inside this text box for the default we could reference Gallery 1. selected whichever record is selected now at this point we can get at those fields and we can get at the labels and the toggles and if it's um of course we already know it's selected because we said gallery. selected but uh let's look at title so if I run this if I click on accident reporting look accident reporting that's how you link a control to the gallery okay we talked about all items count Gallery do selected um what about show navigation so if you look at this there's like a this little button that maybe you've seen with a gallery maybe not this is the navigation that they're show that they're talking about y so you can use a scroll bar you can do something like this um you know actually I need to put it way down because we have it at 10,000 right now go Max and I'll just add one there so there's a different way of navigating or you can use these little buttons okay so how do you get those little buttons in a gallery we go down and it's called show navigation and but def by default it's off or or false okay okay and if you want to turn off your um scroll bar you could put a false there and you'd be hiding that okay and there's a there's a sister property to that and that is the uh um navigation step if you look at that you can set how many times that you're gonna how many rows you're gonna move every time you move click on that really it it set to one and you could set that to say five you know oh wow look at that Pebble snatching I didn't know that W you ask me to investigate it that's great okay so does it work with the scroll bar as well or just the navigation stuff I think it's the navigation yeah I mean if you click some so a scroll bar you my screen is really small sometimes in power apps other people's power apps I see a much thicker scroll bar there um and maybe it's controlled by the system or the browser level settings but um if you click on a part of the scroll bar that isn't the little handle there it should be scrolling like a page at a time so that seems like that would you know I might want to move that so how many rows do we have here three four five six seven eight so what I might do here is put in a value of eight yeah we look at a like a page at a time that's that's so that's cool all right NE kind of neat navigation step right guys we're learning all kinds of stuff here we are navigation step now parent. template okay this is some really good stuff this is stuff that you really need to know all right you ready for this so um I do this almost with any every time I use a gallery I'm in here doing this so what I'm going to do is I'm going to um um well I'm G to run this and this is an easy way of scrolling up to the top that's what I needed to do um so I've got all these controls here and sometimes you know you'll have a label like this and you'll have this label like down here and they're not quite a line and it looks ugly you know well what you might want to end up doing here for a label let's say the you can set the Y to zero which is typically what I do for all these controls um I'm I'm going to try to select all the controls that I see here I want to make them all have a y of zero put them all the way to the top and now what I want to do is manipulate the height and make it Dynamic absolutely I want to be the exact height of the row so I'm going to say parent dot uh uh template height now you don't want to say parent. height what's that going to give you that's going to give you the full height of this Gallery which is a lot more than just one of them right and it's giving us a value of 53 okay now if you had something else you wanted to take up the full span of the gallery let's say for a second um this particular label let's say I wanted to take up the the full width of the G Gallery um or the rest of it okay so what I would do is I would go into width which is set to 500 I would say parent template width now you see that it hangs off of there a little bit you don't want that because this text could be like going out here and could be uh giving you some bad stuff right um so what you want to do is subtract self self is a keyword that references whatever control that you're in okay so right now you see we're editing the width property the width property of what of a label so we're referencing the label that we're currently on self. X so we'll take the full width of the gallery minus how much over the the X offset that it was sitting at and it gives us the full width of that yeah I just want to encourage everybody to get really good at that kind of thing because if if you're dealing responsive apps or anything that's going to be conditionally uh moved around make that way you want to be able to be very aware of X and Y and moving stuff around I uh like the like the bouncing ball right um bouncing ball another cool thing Darren that you you're doing right here by by setting all these to the template height now if you're sitting here looking at this and you want to make some adjustments to your gallery because you're saying well you know what I want to I want to add a couple I want to get another row in there or maybe it's coming my rows are cut cutting off at the halfway point so I want to adjust my template height just a little bit now if you just adjust the template height you don't have to adjust all the other controls again if you if you didn't do that you would have to every time you adjusted the template height you'd have to You' have to fool with every control that you had in that template you know so that's that that's the the neatness of what you're doing right there I think um so you're telling me Kurt if I went in a template size for the gallery and I change this to a 100 if we reference that dynamically things will look right even if that changes right that's right that's right everything except that toggle the toggle needs a little bit of love and attention it does I wonder what's going on with that I wonder why why didn't that okay so what I did was I made the um the height to be dynamic and and the width isn't really set now if I made the width to be twice that okay so this is something else dynamic could do we could say self. height and it would be a perfect square but if you wanted to sort of sort of take up the full space we would have multiplied that by two isn't that funny that okay I didn't know that okay so see this is another one that you you've learned by the burn that's something that you've learned from the burn on you know but let's say you need to write a book and call everything I've learned from the burn you know and just these little things like this you know that you don't even think about it it wouldn't perform well with the SEO but after they read it they're like okay now I get the [Laughter] title um so in a realistic app okay we probably wouldn't want the toggle to behave like this right no so we might want to say well I I just want the toggle to take up half the the space of the height the template height some might multiply this by 0. five and then always centered and then always centered in the height right okay yeah yeah yeah just give me a second here um so so the toggle is a little weird it's not a perfect square okay so we're messing with the the width here I almost want the width to always be twice that of the height so let's let's work with the height for a moment and we say well we only want this to be half of it okay okay that looks about right right maybe a little less maybe 35% okay and then what we want to do is we want to Cate vertically right so is this what you were talking about yeah how would we do that Kurt well we would take the the the the the height of the the template height okay we have it right here minus the height of the the toggle okay so you want me to do it right here on this property or is it another property you had in mind um right no no it yeah minus self. height yeah I'm sorry minus self. height you're on the toggle going self. height divided by two by two now keep in mind we're in height what's that and make sure you put some parentheses in there am I in the right spot um I think maybe what you meant to to uh the property that you that in order to do this would be the Y right oh right I thought you were I can't see okay there we go okay yeah yeah the Y position to be there yeah yeah okay so for the Y we want to say self. height I thought you were already in the why I'm sorry okay all right so what we want to do is say parent. uh template height and then we will subtract self. height we put some parentheses around that will'll divide it by two there you go yeah and that's actually a formula you taught me for a lot of cool stuff and and I'm thinking that's that's that is suspect that formula right there guys that especially my accelerator students that is suspect to go in a function that is suspect so we could have a center Center Center vertical and Center uh horizontal of any any control maybe perhaps you know yeah you pass in this number and this number and inside the formula we'll do the divide by two and it we'll put in those parentheses so now you never have to remember the formula exactly cool I like that Kurt exactly we should do that cool all right so going back over to our list of properties so we talked about template width and height now there is a template padding so I'll just go ahead mention that parent uh template padding okay and we use that at the very beginning of the video I I told you guys I like a padding of two you know WP count we talked about that um talked about that so a template size that's how much space the each row will take up depend upon horizontal or vertical right Nick's saying PE uh pay big money for this um yeah there's the template padding template padding there uh we talked about all items what about transitions we talked about that we Kur we've talked about all the vital properties yay we actually are covering some really good ground here sometimes on these live streams we get going into these rabbit holes and we don't get done near what we want we're actually getting things done today this is this is great stuff you guys are gonna be very well versed on the gallery by the time we're done here if you're not already and that's why I named it everything you wanted to know about a gallery um so here we got these tips and tricks highlight the selected row we've done that reference controls as if there were fields we talked about that we talked about toggles now Curt is there anything you want to add to the toggle thing because I think you either you help somebody with toggles inside of a gallery yeah there's there's there's something about that you're you might be tempted to to switch there's there's a couple of important properties you got the toggle default property and if you have that set to false it's always going to revert to false and then you have to click it again so so oftentimes you want to have a toggle associated with something that's going to be um some some like right now in the gallery you're actually in a you're showing a table okay the toggle is usually referencing something inside of that like you got you want it to be selected maybe you want it to be selected so you would have to have a field in there called is selected or some kind of selected field in there and you want to you don't want to change that field to be true like let's say if you selected it to be true toggled you set the toggle to true you might be tempted to go into these properties called check and uncheck or um what is it un I think it's check or uncheck isn't it we got onchange oncheck on select and on got four of them right so you might be tempted to put change that in the oncheck or the on uncheck when you're referencing a table okay now outside of this Gallery outside of tables that oncheck and on uncheck are probably pretty important properties but when you're messing with a gallery and you're messing with the underlying data that's attached to that Gallery do not do not ever ever ever use those those those properties okay go to the gallery select and then you can reference that that toggle that's been selected the through through the gallery the gallery. selected in this case it' be Gallery 1. selected. toggle reference that and if it's true set your is selected true and if it's false set your is Select Ed field the underlying field that's in the data source set that to true or false and now in the default property of your toggle you would set that to the data sources do is selected okay yeah and maybe we could um devote uh a separate session of this but you just made me realize we forgot one really vital property and it's probably to be expected for people like you and and me CT because any property that starts with on we think that's not a property that's an event right but power apps everything's a property they mix events and properties together so anything that starts with an on is actually an event type of propert so you've got imperative code in any property that starts with on and everything else is declarative what so do you guys what is imperative code what are you talking about what is that word imperative uh comp of code means that you can do something okay think of functions like navigate launch notify back patch these are like you're going to take actions right but you have declarative type of things like the The Fill color right that's declarative I'd say most things are declarative in in nature within power apps um so yeah and with and one of the big differences sometimes people don't know when to put a semicolon and where not to put a semicolon well you can use semicolons to break up lines of code in an imperative property you do not use semicolons in declarative the declarative you're setting a single value the imperative you gotta block a code baby right right I'm G adjust my camera here yeah good explanation man yeah uh um so what I was going to say here was um whenever something is clicked on within a gallery and you want something to happen based on that when I first started with power apps I'm like oh I need to select the template so I'm trying no that's the label oh that's the label how can I get at that thing so I go over here in the tree View and I click on the gallery no I'm not I need I need the have you ever done that Kurt like I'm trying to get at the underlying template there's been so many times I need your help Darren help and then you would come in and do this and fix this for me okay so I'm gonna mess up this Dynamic cool thing I did up here so maybe what I should do is make a a copy just in Cas I'm gonna make this file available to you guys and uh so I go in here and uh I I move this and this is what I would do I would try to click on the template so here I haven't selected any control within the gallery I just selected that first record which is the template and it was here I'd say okay now that I have the template selected now I can go to unselect and then write my code and it took me forever to realize oh all you got to do is just click on gallery and it's the same thing the thing would drive me nuts so just realize you just click on the gallery go to unselect and you can put your impera of code right there so just by you talking about the the uh the toggle stuff there um now so this is this is imperative code that we can have and what you said Kurt is you might be tempted to put code imperative code in on change on check on select on uncheck but what you just told everybody is hey don't do that you can mess some things up especially if you've got some uh you know patching code or something well the default can change the value so if you put stuff and onchange and that Gallery goes to get data and it changes it boom you just made that code run again have you guys ever seen a toggle in a gallery have you ever seen your toggle you you'll run your program and your toggles are just going back forth back and forth back and forth It's like what is it doing well that's that's what's happening is you're doing a bunch of clicking and stuff inside there when you put that in there so you got take that stuff out of that on changing on un Change and I'm I'm gonna I'm GNA throw this out here because people pay big money for this this is a big deal just silly you let's say we've got a patch or we've got an update or a remove or whatever code in that toggle and that default is just making it go boom boom boom boom boom boom boom what's going on if you're touching D if you're calling apis you're talking to SQL Server you're talking that SharePoint list it just goes back forth back and forth back forth and you're like what's going on that's weird I'm you know I'm going to go for lunch I'll come back you come back you've used up all of your API do you guys realize you only have so much API usage to use did you know that wow thought that I found out on my on my Denver project and it was very it was painful I learned a lot of painful lessons I I learned from the burn Kurt people pay big money for this I I had to I had to lose a lot of time and and money and effort learning it you know I never I never thought of that if you let that thing going back back and forth like that for long you're going to get throttled they're going to throttle you down yeah it's all on Azure and you're not paying for some server usage so you if you call SharePoint list and query it a thousand times within a minute um they might say h you can only use so many thousands within a minute and then it will throttle you back and uh you'll get in there and even if people are using the app they'll be like hey what's going on I mean we're talking like it takes like 10 minutes for something to come up on the screen for everybody oh what's going on you know you know that conversation right there that you just had could be and people maybe need to pay attention to what you just said because a lot of times we complain about our power apps being so slow and the way we design them they're so slow maybe what's happening is we're being throttled because of the way things are being designed and and that's going to slow your you think anything's G to slow your app down being throttled is really gonna slow your app down oh yeah it's very painful your manager's upset your clients are upset everybody's upset they think power apps is junk Your Name Is Mud I mean it just go it's just a bad it's going to be a bad day for you until you get that figured out they might forget it but it depends on how long it goes that's true that's true especially if they're first impression of power apps like you convince everybody your organization power ups is the best thing since slice bread just let me out let get it let me create nap let me create nap and you set it up wrong that's the first impression of power apps like that's a joke it's all and it's all because you changed the data source from within the on check or on in check just one line just you put it in the wrong property and you screwed the whole thing up yep yeah learn learn from the burn yeah you're either gonna you're either gonna hear it now or you're gonna learn from the burn I hope that you can hear it now guys right back hold on okay well one important thing I'm going to mention uh while Kurt is taking a little break there is if you click on a control like a label or a button or something a label's got an on select look at this select parent okay select parent so if I go in parent is what the parent is the gallery okay so I'm going to say notify and I'm going to say unselect I'm gonna say this item. ID I'll say title how about that title so every time somebody clicks on a row boom Advanced building certificate well that's not right go back down okay so this is the first one AC accident investigation if I click on the second one accident reporting okay I think my uh default property sort of messed things up for me initially okay so why I did that notify is to show that the on select code is being run whenever anything's clicked on so if you look at these labels that we dropped down on our Gallery inside the template they always have this select parent now what happens if we took that out okay what's going to happen now if I click on this label it doesn't fire the parents selected event okay but if I but if you have if you have a label there and it calls parent. select it is going to call that code so when Kurt says hey you don't want to put things inside the event for this toggle a lot of times and you know when you're working with a toggle inside of a gallery um so for the on select oh look at this it's already there s parent yeah okay so if you ever find that your un Select Property doesn't work on your gallery make sure that all your controls in here have that select parent yep I don't know I bet there was at least a half a dozen times when I was first learning this power apps I'd be calling Darren and he'd have to go in on Zoom with me to to put that on select in there for me because I didn't I didn't understand that um but you know you so and and it's not parent right it's not a parent you're just clicking around and you can't figure out why this thing isn't working it's just you know there's no there's no apparent reason and but that's it that's exactly what it is you just got to put that on select in there absolutely or the select I'm sorry select parent um so we've talked about highlight selected row we've talked about toggles we talked about default multiple row selections now I'm starting to wonder Kurt I'm I'm just looking at the time here um we might need to break this up into a a second uh live stream because we've got tons to cover here yeah I want to talk about records like like like when you select an item from the gallery what what you can get create a variable and carry that entire record that you selected over to a different screen and stuff you know so I want there's so much that we want to do we want to be able to update tables especially like SharePoint a lot of people a lot of people are using SharePoint you know I was told that 70% of customers um that need need work done are SharePoint uh customer so you know you guys might need to learn this stuff man the SharePoint absolutely um and a lot of times Kurt I I don't know if I've I've ever told you this but a lot of times with in a live stream I've got like six things I'm I'm I'm controll I'm controlling the live stream I'm controlling this tablet that's stre on Tik Tok I'm looking at the comments the private chat this I'm thinking about what you're saying I'm thinking about what I'm saying where I'm going to go this thing so sometimes when you share even it could be like the best thing you've ever said to me ever in my life and my response will be very good okay the next thing we want to talk about so I never want you to think that I mean I am to you but but I'm also I can my brain's juggling things and it doesn't well sometimes when I say something out of my mouth everybody's going yeah Kurt yeah whatever let's go on to the next thing um but but look I you know I just want to say man I don't know how you do it seen you I've been watching you do this I'm sure the other people that are watching this um you guys just don't realize how hard that is Darren's actually asked me to run a live stream before and I refuse because there's no possible way I could do like he does I mean it's just amazing how much he's bouncing around sharing screens I'm interrupting him in the middle of all that he's changing everything around and and I don't do well with interruptions no he hates it he hates it but he he muffles that somehow so makes my brain short circuit yeah it it's just amazing yeah how he processes a little bit different than than than some of us M mortal so um I just I just want to say that I'm in I just can't get over I I always call him the F-16 fighter pilot because I'm I could just imagine being an F16 fighter pilot having to do that and being cool and staying cool he's not even breaking a sweat here man so um I just think it's impressive you know well I do have my AC but don't ever tell him I said that because I will lie you know what what's uh what's funny is a coffee yeah you can you can recover Kurt from his I just had to share I don't know why I had to share that clip but I did yeah I don't even know Ben Ben says it also sounds like verbs and nouns imperative declarative I like that yeah um and Joseph just rejoined yeah very cool looks like people are really enjoying this and I think we need to do a part two to be honest because like you were just saying all the other stuff that we need to cover going to different screens how we work with globals versus locals yeah between screens because um we do it in a way that I I I believe the the good way in which that you've taught me good programming practices over 20 years ago um so okay we need to get to this um so that's uh the point at which we're at right here multiple row selections so sometimes you know with a combo box you can select multiple things well why can't we do that with a gallery well inherently the gallery doesn't provide that doesn't have a property called allow multiple selections but maybe it should I mean probably make it a a lot more complex but we could actually Implement that and it certainly gives us the flexibility to do it though yeah yeah it's very flexible um so we did talk about binding controls uh so we've we've done that processing groups of rows at once maybe for emailing deleting updating adding rows to a different table on the side or on a different screen or for filtering I mean there's all kinds of stuff we can do here let's let's uh sort of Traverse um you know what's what's coming up here Dynamic adding new blank rose that actually came up that was the inspiration yeah yeah that that is something that you've done I watched you do it this is some cool stuff we've got to do a whole section on that man and you gotta go real slow so people get it you know yeah so yeah that was actually the inspiration for for this live stream and I was like well before we do that we need to cover this um inline editing that's a big one people want to do inline editing you know why why why bring over a form or individual controls on this side let's just have all the controls inside the gallery we can make that Gallery Row that template like really big we it's a form inside of a gallery how crazy would that be you could do it we've talked a bit about data binding I feel like we we've covered that uh using a gallery instead of a combo box okay so I think let me put stars beside three stars uh or maybe I'll just use some weird um G whiz I just want to say D I think that using a gallery instead of a combo box I think that inherently uh the things that we're going to be talking about where you can do multiple selections and doing groups of processing everything will show us why we would rather do a gallery instead of a a combo box right yeah I feel like if we just had like a part two to this where we talk about these three these three things all kinds of things could come out of that yeah and so um this was pretty much like the basics of everything that you need to know to master all the basics of a gallery and now we're like going taking it to a different level talking about these more advanced things I I would like you to add one line to that if you could and that would be edit editing records from a gallery you know like like in other words you're gonna be launching you're get we're going to or better put um editing records based on a gallery selection how is that okay like that yeah and guys we're keeping an eye on the comments right now for you guys that are watching type in the comments right now what is it about now you saw the title to this video everything that you wanted to know about a gallery well Darren Kurt you didn't cover this and you didn't cover this and didn't cover that that's what I was expecting type it up in the comments right now and we're gonna add it in the part two okay let's do it good idea good idea like it I like it a lot um let's see here um so I I have something here ready for you guys I wanted to talk to you about what we do uh most of the week um so you guys might be interested in this check this out this has been the key ingredient for the hundreds of people that we've helped dominate in the organization with this one skill you're able to simplify processes for countless tasks like tracking leads doing inspections logging attendance booking desks in a shared office generating reports tracking employee performance and the list goes on if you have a project that you need to get done or you're an IT professional or a developer or if you plan to eventually do some freelancing work with Microsoft power apps I am literally the only person you need to accomplish your goals spreadsheets and all the old ways of doing things are becoming redundant and the people who are able to build power apps are going to accelerate the professional career so much faster than everyone else who's okay being average I have over 20 years years experience as a software developer and have been working in power apps for over 3 years we have lots of course material for you but if you're eager to accelerate your expertise with power apps at a much faster pace and want to work directly with me this is what me and my team are going to do for you number one we're going to figure out exactly what projects and skills you're working on and the overall end goal number two we're going to get clear on exactly what data sources are needed for your projects if it's a particular project with a deadline we're going to work with you to make sure that you meet that deadline and number four we're going to work with you to make sure that you master the platform so not only can you finish any projects that you're currently working on but the projects that come up in the future and you might want to take those skills and become a freelancer in the future if that sounds like something that you're interested in and you want to expedite the process of being able to build apps that can literally be used for years and you want to be an important asset to your organization and any future companies you work for click the button below and we can have a 15-minute chat about what you're needing and how we can help what do you think about that Kurt um is there anything that you'd like to to uh tell the viewers about the accelerator program we help people with our projects we commit to you for 12 months and help you make sure you reach your your power apps goals yeah and and really this this uh and and there's accelerator students that are watching this right now you guys can chime in on the comments if you want um this is what we do every day in accelerator this is the kind of stuff that we do this is uh I I love it the video content that we make the um you know it's different than what we do for everywhere else uh we get into the deep weeds of everything and I don't know I it just seems like I have seen some really great results come out of these accelerator students I mean I've seen where they came in and I see with where they're at in three months and then six months and it just amazes me the growth that I've seen so there's something about this accelerator offering this model that's just very powerful man it's it's basically like today today this Gallery I just felt the energy in it and um you know for a live stream this was an amazing energy uh uh type thing um that's what we do in accelerator yeah do yeah so the next biggest question um that you should be thinking about after after watching this hey what what video should I watch next anything helpful out of this a comment or even a like really helps and YouTube thinks you're going to like this video next let's see if they're right or you can select this playlist which I've selected for you based on the content you're currently watching guys got to hurry click one of them otherwise YouTube's going to autoplay some other video which you probably don't want thanks got the power Darren who's got the power