Doing What You Thought Was Impossible with Power Apps Galleries

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
last week we covered galleries in a very thorough and deep Manner and we looked at all the properties and we discussed all the different things uh to know about the gallery everything that you wish you knew about the gallery and then this week since of such a popular topic we're going to delve into more the advanced uh topics working with the gallery so I have an outline here and if you guys have topics regarding um Advanced Gallery use within power please let us know I see a lot of you are saying hello in the the live chat hello to you guys um if you have any topics related to this please uh put them in the the comments we might actually you know build on this L here so um Curtis is there anything you like to say as an introduction to what we're gonna do today just want to say hi to everybody and I'm really excited about this this is where you know I got I guess we got to cover some you know the basics of the galleries last time and now we get to kind of put all together and I think this is a sorely needed topic so I'm excited to see this right after we got off the the live stream I remember Kurt you said I think that was the best live stream we've ever done and I thought about I'm like you you might be right you know as as far as in uh you know the the the the counts and the the interest and the engagement uh be right on so it just makes sense to sort of go further into this area I think everybody can benefit if you're if you're a power apps developer this is this is the galleries like your bread in butter right yeah need to display records of data go ahead well yeah I would I wanted you to go ahead and finish what you were saying but I I uh I think it's really what's really cool is like last time we I learned a few things from it and we actually made some PPC uh uh videos based on what we learned and uncovered from the gallery last time time so I look forward to uncovering some of that that too now you know so absolutely absolutely yeah so we we've got um a tons of tons of Engagement in the comments I I um I don't have enough there's so many I don't know that I could show them all most of them are Hells and stuff but uh well let's let's sort of jump into this um and and this topic sort of T the whole idea of cover covering the gallery was somebody wanted to know about dynamically adding blank new rows you ever been in an app and you're typing information and maybe there's like a add another row add another row right and um so that's a common thing in an in a database application a business application and uh if you're a power apps Creator um it's not very straightfor because you think oh I'll just bind this to my SharePoint list or my database table well you could pass a new record but sometimes there's required fields that are in that data source that are going to require um the users's input so you need to be able to add a record without them doing anything providing any data um and then if let's say we're using a SharePoint list really the only we can make everything not required okay so we'll do the defaults and we'll get like a new number for the Auto number in the ID Fe but uh what happens if they never do anything with that record and they click on a different screen so now there's a phantom record sitting out there with no data in it and you've got a dozen few dozen users in there every day and you know over the months there's going to be lots of just blank records that would that would just be a mess in my mind how do you think about that Kurt I agree agree totally on it okay so let's uh delve into this Dam ically adding new blank rows okay so I'm going to still use the application that we had from last week because we might want to switch between some of these here um I'm going to add a new screen um at the bottom here I wanted to grab something uh perhaps something like this here okay so I'm going to copy that Gallery paste it here and this Gallery is bound to our data source which is a SharePoint list it's called raw data so let me go look at that if I go to site contents I'll go down and look at Raw data I've got a 79 records in there okay so uh I somebody mentioned in theat chat that the audio pops oh for me okay now this happened a few weeks ago I'm going to unplug my mic and plug it back in I don't know if it was consistent though because everybody else was have hearing you okay so may not be on your end yeah so please yeah if something's messed up I definitely want to fix it now than having uh you know so much content uh okay so everything's good now very good so we have this raw data and and uh we do have it as a source okay very good and uh so what I want to be able to do with this is just to be able to allow people to add uh additional items for this course this this field here is a a program or a course okay so let's say you might want to give your users the ability to really quickly add a bunch of Records into your data source um which they may really appreciate so I'm going to um what I'm GNA do is I'm gonna I'm gon to create a button because the best way of doing this is to actually use a collection now would you agree with that Kurt what are the power of collections with galleries I mean just to just to keep it short and sweet there it's going to be a lot faster it's gonna be a lot faster on the on select I am going to update context and we'll say Lo right and what I'm gonna say is raw data okay and that will um I'm thinking here do I want to actually create it as a I think I might want to do a clear collect instead well I think that would have worked um I mean this really is a collection we're creating so I say call uh raw data I was gonna ask you did you want that to be a raw data or a row data so I'll click the button there I'll double click on the on the variable let's we have here okay it looks like we've got the data that's fantastic right now let's say we want to add just uh blank new rows okay so let's filter this I'm gonna try to break this down there we go and I'm gonna filter this and give it a false value would you be able to explain Kurt what what is it that this would give us why would we use false it should give you it should give you no records but it'll give you a data structure that's right that's what that's going to do because that second parameter is going to be a condition it's a conditional thing and it that's got to be true so when you're doing a filter anything on that true side that's true on the the second parameter will bring in that data it's essentially creating a collection of nothing right but what's important is you have that structure yeah it's now you can do a defaults on it and you'll get a blank row with that structure okay I love I like it so a lot of times the second parameter uses as criteria in which way it will will pull back data and a lot of times you got an equal sign so like if if this uh the created by. email equals the email user. email and it's going to give all the users data to them right um but it's the equal sign that gives us either the true or false value so the second the U argument for the filters expecting aan if you say true it's going to give you all the data if you say false it's not going to return any data just like you said Kurt so I'm GNA follow your advice here uh Kurt and I am going to do a collect no just for the if you do a true there that would be just like not using a filter at all right that's right and you know what I've done that before and why would I do that be why would I ever do that well let's say I've got some criteria and I just comment all the criteria and I want to see well I'm not getting very much data let's see if there's any data in the table and then I would say either a true yeah um and it would you know so if you're actually intending on using the filter sometimes it's it's sort of useful and temporarily you know it's a great debugging tool absolutely let say defaults and as you guys probably well know the default function is going to give you all the default values for a record source so we we're tell this record Source hey we want to insert a new record what are all the default values um so let's say we've got a column called isactive and we set that up in SharePoint to to always be true well for that particular field it's going to give us the True Value so um that's what we're going to do we'll get a a at least one record in there that we'll use for our Gallery okay so I'm G to put simic Cole in there tend off that line and inside this what I'm gonna do is I'm gonna comment this out it's another uh another side argument on that and I don't want to spend any time on because we got a lot to cover today but that's you know what whether or not to put default values in your in your uh database management system versus in your app you know so do you control do you control your rules on what's going to be the default values there or do you control it in your app you know I personally like to I like to set default values very seldom in my database uh structures I like to I like to do all my rules enforce all my rules in the app you know yeah because if something if something changes now you got records there that you know might be have a problem whereas if you change it in your app it's not so hard yeah yeah I I agree uh with you Kurt I love to have as much business logic and um constraints either the the the freedom to things or to constrain what users can do on the application layer and I think the reason why someone might might want to put some of the logic on the back end is if you have other applications reading and writing to that data source in that case it it I probably agree it probably would make sense to to do some constraints on the back end if if you're not the only app but many times I would say most the applications that we build we are controlling the whole front end there's not a bunch of other front ends that are uh writing to the data no uh Kurt how do you go about setting all your rules yeah so um that's that's a that's a big that's a big topic but you're you're setting your rules in your app your app is actually setting all the rules the actual running the whole front end the entire front end the entire purpose of your program is to set the rules of the backend data you are trying to get data in clean in the way that your your your your bosses or your uh stakeholders want that data to be so there there's a lot of different things you do for instance like if you're wanting to have the default value in a status let's say you got a status field with a a a ticket instead of creating it in a default of new ticket in your in your database structure you're going to have that as your default item in your in your on your screen so that's that's what I'm talking about as far as setting the rules in my in my app now I I agree with that too Darren a lot of times I'm I guess I'm I might maybe I'm narcissistic enough to think that my app rules everything right so so nobody else can use that data except my app right but in a corporate world that's not so true um mean some of you guys that are watching today live in that corporate world and that's just not the way it works right you you guys are sharing that data with a lot of different apps and maybe those apps in need that enforcement at the back end you know so like I said this is a big topic I think we could probably do an entire live stream on um but in to answer Ellie's question you're you're you're using your app to do all the validation in and out so you got prevalidation you got post validation you got record validation you got field validation you've got default validation so there's lots of different and and those those are going to be probably modules that we're going to be covering at some point in accelerator so hopefully we'll get to that I like that so we have this gallery and it's looking at this collection we just created so if I double click on this we can see the data that's in there and it doesn't have any values and that's exactly what I want but we do have the fields and the types okay so what we want to do is be able to add new records um and perhaps let's see here let's take out now right now we only have an ID so I'm just going to display this ID and I think I might just give this a a nice uh border but I want it to be the same border color as what we have for this and if I'm not mistaken I think we we've been using the formulas the app formulas which is a new features this theming gray I set up there I sort of like that and and I'm going to go in and set that up for the Border uh color so paste that there very good and I'm going to set up the height and we covered this last week right if if we want a label or a control to always be the same height as the as the template for the gallery we'll say parent. template height okay there we go z0 very good and for numbers always like to write a line I think that's that's pretty much always been the standard for like a grid type of information displaying stuff and uh so we've got that now let's add in another field here okay and um make this a little bigger let's see what these grid lines look like that it almost looks like it uh everything fits in there okay and I'm going to create another one hey and um I think what I will do is for this um idea I think what I'd like to do is GD okay so there is a GD that just being displayed in a label and um over here I'm going to say now let's see what it gives us okay so we have a GD we have a date time stamp okay now let's [Music] add for like this Icon better than just the plus sign so I'm going to use that and put it over here on the as side and I'm going to try to make this look pretty and I'm going to say FX oh there's a theming blue color we can go with okay that looks nice what should this icon do well I want it to add a yet another record now how we do that over here on the clear collect what we did is we just took this to add a new one and I'm going to show you one of one of our tips and tricks that Kurt and I discovered which is you can go over here for this icon on its on select and have some code that will do something it's imperative code what's the difference between imperative and declarative all your imperative properties will start with that on uh at least if Microsoft creates it right if it doesn't have the on typically it's a declarative type of situation okay so let's give this icon a meaningful name so I'll say Ico new new row okay then I'll copy that name name and then back over here I know that we'll want to run that code so all we have to do is say select we'll put in the the name of the control that that's going to select and then that will fire that code over there now why did I move it over and do all that well the code for creating a new record could grow it could become more sophisticated and what you'll find is if you have something in two different places if there's a bug fix or something to add to it now you got two different places to remember and believe you me at some point you will forget to update one or the other or you have a bug in one and not in the other so it goes back to the principle called dry it's an acronym uh Kurt and I didn't come up with this but we know of it and we' like to let you guys know about it the acronym stands for what would you say Kurt i g to rope you in to to talking more instead of me just yeah don't repeat yourself yeah um yeah we didn't come up with it but Darren made it profound so how's that incidentally yeah remember people pay big money for this now I don't know if you invented that that phrase but definitely made up profound for me we try I think I did I think I did invent that one so check this out I'm going to I'm going to click on this create collection now we should see different date stamps now if I do that boom okay so it's now 10:21 okay very good now what happens if I click on this button here oh look we got some more records now I almost want to go over here to the date time stamp and sort of change this up a little bit and um if you ever need to format some text uh you almost would think there would be a format function right there is a text function that allows you to format text okay so here I'm going to say uh here in the United States we like to see our day then month then four-digit year but we also might want to see hour minute second millisecond and then we'll say uh AM PM okay so that's the string I like to use there so now you see that maybe at the beginning it wasn't capturing the milliseconds so if I start over see we have 305 for the milliseconds okay so it's a little more useful now um so Kurt what do you think of this like have we have we done this have we completed this just dynamically adding new records um or is there something that we should some something more that we should say about this topic I mean you feel like we've covered it completely well I mean there I think there's I think maybe you need to talk about when you're adding new Rec okay so that's you're you're just doing the simple ad for the simple ad that's fine but I think we need to be able to go in there and edit those on the fly right and to answer and to answer Dave Martin um he had a question out there in the in the comments is this SharePoint as data source right I didn't know it used a GD and and what this is this is a collection so it's got no data source right now right now the data source is our data source it's the collection so there's a GD function out there in power apps that creates the GD for you we put it in in into that now SharePoint will do a GD if you if you put it as as a text field right so you you can create a text field and put that GD in there and so you've got a GD with it's kind of way to to make SharePoint do gids so um I hope that answers your question right with that yeah this some good stuff guys yeah so I guess where I where I was thinking that with this Dynamic now we're adding Rose and I think you might have covered that very well but I think to make this Dynamic we need to be able to go ahead and play with the data in there as well too um and maybe maybe maybe we need to do some summing of those rows and put that in in into a variable or a text label somewhere on your app maybe like maybe you're doing like um I don't know maybe it's a point of sale where you're where you're you got some kind of value on the side and you're you're just you're just summing up that row or that field that column I guess I can't talk this morning it's a column Kurt it's a field you're doing man you're doing good okay so there we have it so I'm trying to create a a cool looking header which what I would do for any G typically um so what's that I'm sorry Darren also since we're doing this we probably should do do dynamically deleting as well so that I like that basically we're make basically we're making a cred screen out of our Gallery right yeah I don't know what crud stands for but somebody made it profound um okay so this SharePoint as a data source right it and there is a data source that we are basing the collection on But realize we're not putting this data in SharePoint yet we're just putting it we're not even putting it the collection Kurt right because I I think that's a a distinction here we should so we're we're learning all kinds of things so if I if I double click on this collection that we've created okay so we have one two 3 four we have four records and there is absolutely no data in here okay and this is important to understand um I I I believe uh and I think you would agree because sometimes people need to bring in data from different places and display the culmination of all the data in one Gallery okay and in that case what I tell people it's like okay what do you want to have as the controlling of um data point a controlling collection that's going to control exactly how many records are going to show up in that gallery and then that's that's what I do and then if I need to sort of join in data now you created some really cool stuff over in the accelerator uh in some in a module on Collections and you show people how joins with Collections and I I'd have to say it's it's really amazing um so a yeah it's pretty cool you you sort of blew me away there Kurt so for you accelerator students uh I think a lot of you are are looking at this new module but uh if if you haven't really giv it much thought there's tons of value in there okay and um so when you're pulling in data from different sources you don't want to be doing lookups or filters inside the gallery because that will slow your your stuff down now exception of this is if you if you go grab a bunch of um data and put it in collections okay now your collections right there and if you do filters and lookups and stuff on those collections well it's right there in memory there's no round trip so that's sort of how you get away from that I mean you could have five different tables and and your G could be a cation of everything hold on hold on do it what is a round trip Darren what when you say what's a see you're you're talking that that Pro slang and some people like me just ain't Pro so could you tell me what round trip means there's no round trips what's that mean what's what's happening there yeah so um I am gonna do something on on a screen here because I want to have a chart to show you real quick here um and I know just a thing to do I'm going to use if I can get it some up here this is this is probably the biggest point of as to why collections are so darn important yeah I got accused of just loving collections too much but but um I don't know I think this is the reason why I love too much I'm G zoom in a little bit more here I want to show you guys my prompt to get at this um now David I'm going to get back to to your question because there's a few more things I wanted to say about that but um okay so show me I guess I need to move us down a little bit uh show me a diagram now I'm using a plugin here and it's for Whimsical okay show me a diagram illustrating what a round trip means from a web server to a database server also go back to a users browser let's see what it comes up uh what it comes up with here I think this might be interesting because when I was learning all this stuff uh over 20 years ago um the books I would read they would talk about um yeah I'm going to click on this Whimsical link here to to sort of show this off oh this is perfect I love it I love it this is great stuff guys okay so check this out I'm gonna I'm gonna put me Kurt in here make a smaller we're not covering up anything and uh so what I'm going to do here so a user's browser they go to a power apps app okay so they do a request look at this diagram Kurt do you like that I can't you're muted I think but there's a request for data like you try to go to an app and you're on the screen and then you're like okay let's go do a filter or a look up on data source so this this could be a SharePoint or a SQL server and it's going to make the query and it comes back and that could take a half of a second it could take three seconds okay depending on the data how much data is there um how Microsoft servers are performing that day so that's every time you do a lookup every time you do a lookup in a gallery that's what's happening let's say you've got 50 records in your gallery you're GNA and you've got a lookup field in each one of those it's going to have to go and do this for every one of those in your gallery and then you're wondering how come it's so slow but guess what Darren what this this diagram is not showing you is all the connectors that you have to open and close within that as well and all the sockets that you have to deal with if you're timed out of your socket so yeah oh my goodness absolutely yeah you got those apis um I think I have talked previously on the advantages of using data verse even over a SQL Server data verse is right there on the Power Platform so your your power apps application is in the Power Platform and you want to get a data verse data well it's right there within the platform okay now try to use cql server which is great or even SharePoint what you're doing is you're going through a connector API and you could make the case well there's a data verse uh you know well say whatever you want the the Microsoft official documentation has got a diagram just like this that you see on the screen and I think there's like four or five steps to get at data in SQL Server especially if it's an on premise going through a Gateway rather than if you're trying to go to data verse it's just it's just right there it's just like two steps okay so let's say this takes let's say it takes one second let's just keep it simple every database query a filter takes one second and as your app loads up you know it loads up a data so it gets a data set one sec No Big E you know uh and you're going to put it into a gallery No Big E you know sometimes people wait for five or 10 seconds whole app to load up so a second's not that big of a deal now think about this this section I don't know if I can draw I'm sort of hoping I can draw a uh rectangle here okay and hope I can change the Z order which it doesn't look like I can see all this all this comes from you saying round trip you know how I am Kurt what that this is what this is what needs to be done though when you say round trip this is what that means yeah this wasn't important I wouldn't be spending any time this this is a big deal and this is really related to Gallery work inside of power apps okay imagine this step right here it takes one second and you got a gallery that just it RI on that data right and then what happens inside your gallery it's like oh I need to go pull in some user data let's say we've got a user ID or maybe even their email address in that table it's like well I need to go find out who their manager is so you go do a look up on a different uh table and every single record that you let's say you got a label and inside that labels a lookup you go do and let's say that Galler is aund just a hundred rows right well you've got a second here and then how long does it take to do a lookup for every single label for each of those hundred rows well what's that and it probably doesn't stop there because if you're doing any kind of sophisticated app you're probably doing lookups to see what color that you're going to be making your fonts or or your you know your rows there's a lot of things you're going to be doing lookups so you might be doing for each row you might end up doing like six or 10 lookups um on that data w we yeah uh Ellie says I have so many tables she's bummed I I wouldn't bummed would you agree Kurt she shouldn't be bummed she shouldn't feel bummed if she has a lot of tables right that tells me that you you probably set up your database right according to database normalization rules yeah yeah yeah yeah now there can be a a point where you you're over engineering your data like you're up to seventh or 12th normal form and um you know NSA would be needed to figure out how to get data out of or something you need some type of supercomputer or something uh you can make a data scheme a really you can over engineer it to the point where there's just there are too many tables but U anything that I've seen Ellie from from your application um and C you've seen her her database diagrams right they uh there's a good amount of of of tables there but there I wouldn't say there's too many right no no it seems like I I don't remember seeing anything that was beyond the normalization so I think you're fine with that but um I guess to get back to at that one point with when we're talking about these lookups the I guess the the the the whole point of it is that what what happens is you can get so many lookups happening so fast when you're loading galleries that the back end will end up throttling you and it will really slow you down it's gonna think that you're doing something crazy and it's gonna stop you so now your program is going to go really really slow so and a lot of people haven't even they haven't experienced that try this TR tangle one more time and if it doesn't work then I'm not going to do it maybe I'll put it right here um CU I experienced that on one project where they didn't give me all the requirements up front but there were there were still The Upfront um requirements they were extensive and there was probably like 30 to 50 screens um and because I didn't know things up front iow was end up having to do additional queries and stuff and man we hit that we hit that throttle and it's no fun a user will get in your in your app and they'll just be sitting there waiting and that's not what you want you don't want your app to you got phone calls coming at you like your app is so slow it sucks you're terrible programmer you don't know what you're doing either they will they will accuse you of of not being a good developer or professional that knows how to do their you know they claim that you're you're incompetent like you did something wrong um or they'll come up with the thing like well every Power apps I've used so far has been really slow you know yeah power apps power apps is no good we got to go to a c yeah got do a net thing here now somebody had something in the comments um I think Mente was asking is there a limit do collections have limits where where did he just go he just left me okay do collections have limits on how much row data they can that they can have hold I I don't know what that is I don't know what that I bet there is but I just don't I've never seen it yet ask chatty ask your friend chatty Darren I've never come up against that no that limit I've had well more than 2,000 records in there yeah and with power apps you're limited to 2,000 and I I don't a lot of times people hear that they're like what that's horrible our database has so many more more than just 2,000 you know Millions it's like well that you're not going to display two million records on a screen at once are you then not even 2000 there's no reason to display 2000 you just need to be able to get at the data that they need to see on a screen nobody can see 2,000 records on a screen at once right um and I love what another comment was saying and multiply that number we're talking about the the number of lookups I suspect multiply that by the number of users so so that's the other big important thing I used to tell that to you you guys when you were a student uh Darren I used to say you know you're you're probably fine if you're just doing with five or 10 users but if you're if you're running this program for General Motors and they're doing uh processing for five million customers that one lookup is gonna get done five million times man so so you gotta you you gota you got to look at what you're you're you're dealing with as far as your users as well you now when you're dealing with Galleries and and all that uh probably you're not dealing with five million at once so but that the point is though is the more users you got going at it and hitting that thing could be it could be a problem yeah um I don't know that there's a limit with for collections it might depend upon um I I've never run into it I've just done a few queries and I don't see a good solid answer on that um I guess one thing would be is do a test uh write a little app that just here 10,000 here add 10,000 see where it breaks you know that that would be a good way to to figure it out right yeah um so yeah if you've got a query that that takes a second and you got a 100 records of 101 seconds to load up the data I mean you could do a concurrent use a concurrent function to do both queries at the same time so in that case it would be 100 seconds not the 101 but still that would really slow down your app application quite a bit I I would imagine so I wanted to get back to uh I just want to straight out the confusion that these values that you guys see on my screen these are not in the collection they're not in the database yet they're not in either of those locations yet we will have to do a patch we'd have to do a patch to put them in there pretty much um and so far and and this is just displaying so we just have a label here that's displaying information okay so let's add something like a text box text input okay and let's modify the um yeah the title so we should be able to say this item now we learn all about this item last week okay uh. title and that really shouldn't display any data because these four records don't have anything in there yet we'll go into the uh border color and I set that up to the FX the uh theming gray and I don't want any border radius because I want it to look almost like an Excel spreadsheet is is sort of what I'm going for here so um because we've got a GD and then a date time I want to be able to add those two items to my SharePoint list so I'm going to exit out of the full screen mode I'm going to go over here to Raw data and I'm going to add in two additional uh columns here and I'll just call this create a column and we'll call this GD okay single line of text uh is fine for me now in SQL Server there is a a column type called unique identifier and I believe it's the same over in data verse as well and dataverse creates a unique identifi fire for every table whether you like it or not with the same name as the table name y so I'll throw that in there and let's add did you mean did you mean it creates a unique identifier for every record is that what you're saying well it creates a it creates a field in there that's the primary key right I created a customer table there's GNA be a customers field in there it's going to be Y unique identifier um that is that is the power of the lookup later on when we talk about lookups and some of you guys know about that already when we talk about lookups lookup fields in dataverse that is the power of the lookup is that GD uh that c like he just said if it's a customer table the customer ID um be becomes makes makes lookup Fields really strong absolutely okay I'm GNA go back to full screen mode now if you ever change your database schema in your data source you need to go data sources here and make sure you do a refresh otherwise power apps isn't going to be aware of any new schema information okay so I'm going to save that uh hit run I'm going to start over from scratch create collection and I'm GNA create four rows here okay and um so here this I I want to display yeah there's the title uh or the title that was renamed to this long fil name here um so perhaps this could be a screen like hey you know um I want a screen where I could just rapidly enter a bunch of courses well this would be a good way to do it and you wouldn't have to put a GD a datetime stamp I'm just showing you some some cool stuff that you could do in addition to this okay and look at it you'll notice that now this will be the ID once we start getting IDs in here but um um yeah so this will be the title and they'll be on be able to go in here and and type this in they can see this is readon information so whenever they clicked on it that's the date time stamp um so we've created something here that um almost looks like an Excel spreadsheet and I'm gonna go in here and I am going to I'm G to start this off with if the length of that is zero then I want to start it off with some text otherwise I want to have I want to use that but there's nothing in there say course z 0 I can say oh that's one that's two that's three that's four okay now at what point now we know we can update the data source with a patch so there's one of two ways we could go with this we could dynamically write this back to the data source as they're entering it almost with no interaction with the with the user okay or what we would do is we would create a another thing like this and this would be um a save feature okay and then that save feature would save everything that is down here in this grid that hasn't been saved to the data source Kurt which one do you prefer um I I I prefer to have that save button up there because I want to validate every row and I want to I want to be able to have full control of my validation um back to the rules that we were talking about earlier you know I've got my business rules and I got to make sure that everything's set perfectly before goes into that table yeah um I've been asked before to add um to allow them to add it D so you might be asked by your users and I agree with Kurt what he just said there okay I I would do validation I want to have control the only downside is if they move off of this page and they haven't saved it well I don't know do we want to go in the screen on hidden and call the select on this that would do that right um yeah we can do that okay so let's go under the save button and we don't want to do a collect what we want to do is a patch and but I'm gonna do is you know another I'm just sitting here thinking through that what you're saying and I agree with that completely another thing we could do is put a save button on every line that currently on yeah and hit that save button as they're entering their record you know and you could just do that save record each time and then you're gonna I'm suspecting that you're gonna put the ID field if it's a saved record it's part of that database or part of that table it's going to have that ID in there right so we'll know that it's been saved or not right that's true absolutely so we could do that at the record level if you wanted to I was just I didn't know which way let's do it in such a flexible way Kurt now you taught me this a long time ago you create your app to be very flexible and to be extensible you know something changes it's all data driven yeah you you know you have a menu oh we need we need 15 more menu items like yeah just go in the database and add the menu items and it will show up on the app like no no extra coding I I wrote it flexibly I made it data driven right yeah you could set up this this use case to handle both I think that would sort of be cool give give them the choice you know I agree so I want to patch The Collection data I'm not going to patch the data source and there's a reason for that uh and the reason is that I don't want to um let's say we added 50 new records I don't want to sit there and hit SharePoint hit the data source remember our diagram our round trip every patch is a round trip and we're g to do 50 of them they might as well just pick up their cof the coffee mug and go fill up and go to the bathroom maybe go off to lunch because um that might that might take a little while might take a minute you know you know m Michelle just real quick I know you're thinking that but Michelle just had a good question I thought could you put a timer on the amount of time to save the info in the collection so you could have a timer doing the operation the save operation and and you could do your validation within that timer and and say well if if this is if this fits all the the criteria go ahead and save but maybe they didn't want to save yet so I don't know there there's so many things about this right yeah um I actually uh it was my Denver project they wanted an app to be used by a group full of people in a room and they were having a discussion and they all had the laptops and they were all using the power apps application and they wanted the synchronization of what's on everyone's screen uh to be updated with the things that people were saying or or agreeing or disagreeing on and it sort of facilitated this thing and power apps that's one thing that power apps doesn't do very well uh synchronization of multiple users editing the same data or the the data that will be displayed on all screens at the same time so I did use a timer in this case and I'll tell you what I found out and yeah you could absolutely use it and it could work wonderfully in your application what I found is um let's say they're they're in here typing and then it goes to do the patch um but it it did the patch let's say the timer hit and I'm in the middle of typing but the timer hit when after this this s was typed okay and I continued to type well if this thing is bound to the data source now right now I have it bound to a collection so it's it's sort of a disconnect Ed record set right um it would mess people up so what I did do is I had a countdown like every 60 seconds it would it would do that and um it sort of caused it caused anxiety in people can you believe that they told me no that's freaking me out and I I actually had a little icon that it was an animated SVG and it sort of pulsed like oh about to refresh and they're like oh that gave me anxxiety oh it give me anxiety too i' had a problem I'd have been like oh oh my God I got you know yeah yeah you know you could passively do this too though within your thing you could say okay on the current record assume that the current record if uh if it isn't validated you're on that current record don't don't save that one you know you could you could do something like that too there's a lot of things um one one of the things like Ellie's talking about you know saving versus submitting because maybe there's stuff in that they need to leave the screen and be able to come back still got that you know um we're basic we're basically thinking that that collection is going to clear it if you if you come back into the screen but what we could do is we could say hey if there's load of data in there we could ask them hey did you you know you got unsaved data here do you wna do you want to save this first before you go on or you want to continue working with this data you know there's a lot of things that you could do because a collection if you got that stored in a collection it's it's Global memory so it's going to remember that it's going to still be there when you leave the screen and then come back so there's a lot of different ways you could do it you could also save if you're leaving that screen you could also save it to another collection a holding spot and save it later if you need to um yeah you know it's it's really it's just use your imagination kind of like what you did with the Denver project right it's you know you got to get creative sometimes when you're looking at this kind of stuff but the point of this conversation the beauty of this whole thing is that there's look how many we've just been talking for 15 minutes on on all the different possible variations of saving data because of the way we're doing this it's so flexible that you can do it's basically on your your imagination right yeah it's very true EXT title and um this save button you know there I don't have a save button yet on on each individual one here but here on the save button I'm going to go through the the gallery dot I forgot to put all items there so there's all items and I used an Alias okay called my because it's a lot easier to type than this record when you're in a loop right so I'm going to say my. txt title. text now you see what happened there I am looping through a gallery and one of the properties on each row I can I can reference the individual controls but don't make if if you have something like this like some type of a loop don't make the mistake of leaving on this my DOT because if you do it will grab it will reference the text box out of the first record in that Gallery I learned that the hard way yeah yeah so we've got that we also have a u a GD that we added right yeah there we go and let's use I'm gonna name this label lbl GD and we've got a lot of activity today Kurt I'm seeing the the the live chat going I'm having a hard time keeping my mind on both what I'm talking about what I'm doing yeah I got I got several things in here in the chat I want to talk about but I don't want to interrupt your process there so um yeah so um now are you able to click on one of the comments to show it no like I I can't do that yeah I can't do that okay um but when you think it's appropriate say hey hey Darren let's look at the last comment by by Rick or something and then I'll go over and do it whenever you feel appropriate and you might mess me up but but you may not yeah I just want I just want you to be able to get your your process done with what you're doing at a stopping point now get in there um since we're there yeah Michelle says that is more what I was thinking sort of like saving things we're talking about we're going back to the uh saving things in different places um saving things in a cart to purchase like a shopping cart um and I I guess I just wanted to point out that we have a lab in the accelerator program coming up that is going to be dealing with just just that thing shopping carts so uh keep stay tuned for that one we got some really cool Labs coming up in this accelerator program you know Kurt we've got a lot of exciting things going on right now that we should at least mention in in passing um that we're still we're still doing the the personal pocket coaching that is still avail ailable what is personal pocket coaching that is a bite-sized or pocket size um video by either me and or Kurt about a topic with with power apps and you're going to get one for each day of the year okay yeah and uh now that that we're talking about it um I think it would i' be doing a disservice to everyone who um you know may may be interested in this by not showing this but if you go over to our community there's a link down in the description um to get to this community this is a free community there's a lot of free resources on here um but if you go into personal pocket if if you purchase it and what you'll see here we go all the way back to Christmas Eve we had three bonus ones in here we got January we got February so you're going to get uh 365 um lessons uh bite-size lessons that you could watch while sitting on the toilet or when you're on your lunch bre maybe you might watch two nobody nobody watches videos when they're on the toilet do [Laughter] they right I love that you brought this one up Ellie says I do like the PCC uh P it's it's uh PPC right but it is a quick and easy five to 14 minutes I thought that was funny because it's supposed to be like five minutes right but the 14 minute ones those are Curts I can't I can't get anything talked about in five minutes I'm sorry guys [Music] shell says I'm just happy I got my ball to bounce would you like to explain that one Kurt yeah that that's been the greatest thing in the world you know it's so funny because it's in our second lab in accelerator and uh I just thought I throw the bouncing ball in there just to give somebody give them something a challenge you know to try to learn how to control the pro the computer and that has been the biggest deal is that bouncing ball but really that bouncing ball is I loved what you said there was one time um D you talking about it being like Mr Miyagi and the crowdy kid right where he was do a wax on and wax off you know the guy wanted to go out there and wanted to do some cool Karate tricks and the guy was making him wax cars and paint fences and all this crazy stuff he's like what he was doing is he was developing the muscle memory and that's what we're doing with that bouncing ball that bouncing ball if you can control that bouncing ball think about all the responsive apps that you're G to try to make think about all the times when you need to be able to uh uh relative position like Gallery uh headings and whatnot you're G to be doing all sorts of things where you're dynamically placing things that's what the bouncing ball does and ultimately and this is something I'm gonna wax philosophical here folks But ultimately when I'm teaching I don't know if I can teach anybody anything about programming it's about having 100% total control of your program at all times you know you can't control much in this life right only your thoughts feelings behaviors but you can certainly control your your programs and really it's a game to me it's about it's about you got beat the Beast right you this this computer that you've got is just a bunch of electronics it's just a big old pile of electronics over there and it's got all this power but how can you harness that power to do one thing at one moment when you want to do it that's the game Beat the Beast you know I just I just I love that I love that game that's why I love that's why every day Saturday somebody had asked earlier is it Saturday already and I'm thinking I don't know because every day Saturday Saturday for me all all your Saturdays blur together Kurt they all do right but that's the whole thing and that bouncing ball does all of that so if you can if you can handle that bouncing ball we talk about this all the time Darren right in business it's all about reading a record writing a record and processing the data so if if if you can handle a bouncing ball then I suspect you could probably read a record write a record and process that record you know um so there I almost want to show off world according to Kurt what you got here so if I look at the the full screen here you got the ball bouncing so this is one this is the most popular PPC video and it is under 10 minutes so I know it can be done by Kurt and uh of course the coding here is top secret guys don't don't be copying down any code that he's got here this is top secret um but yeah he's got all these balls moving I I got you muted but I'm GNA I'm want to play it so I can see the the balls bounce and your balls bounce off the side of the wall of the screen yeah so it seems like you got some logic that you'd have to have in there huh yeah and there's and there's a special twist in the accelerator one too because we have controls really this is nothing but Sprites and if you've done any kind of game programming that's a Sprite you're you're programming collisions so so you know in accelerator I want to see the balls Collide bounce off of like if You' got a a combo box sitting up there on the screen it's going to hit that combo box and change directions and you know so yeah I like it you know Ellie says she's learning math again um that's the whole reason why I'm a computer programmer I suck at math I hate math I want the I want the program to do the math you know I want I mean I want the yeah I want the computer to do all that [Laughter] I yeah someone said that's really nice yeah Kur Kurt does amazing labs and practical assignments he is like the master of that um but what I wanted to say about this code so we we Loop through all the items in in the uh the gallery okay and then we patch the gallery so we haven't touched the data source yet now there's a little trick that I learned from uh Matthew deaney here we're gonna patch the data source a raw data what are we want to use to patch it with well did you know that the patch can just take to two arguments now a collection you can just pass a collection so it knows that all of the records in there that have changed you could you could have 100 records in there but maybe only one changed you could do this and it's as efficient as doing one patch now it's one round trip okay if you're doing a 100 values that might take longer than a second or two but um I think the statistic that that Matthew Deany came up with is 10 times faster then great go ahead one round trip that says it all doesn't it we based on what we just talked about that's amazing isn't it so you're not doing a Passat for every every record you're going back in one thing now I I kind of wanted you to and and this I'm gonna be careful asking this because I don't want you have to go down a a rabbit hole here but I kind of want you to go and type in that patch and see with the with now that you have the new um intellisense it shows you how many times that that function has been overloaded right so let's talk about look at that you got five overloaded functions see that one of five two of five three of five so so that shows you every one of those is a different overloaded function now that the the topic of an overloaded function is a whole another thing but basically they have five different functions of the patch function five variations of it and each variation uses the same name patch so it's pretty cool it's it's pretty cool it is and it also shows me like if you look at the first one the third record typically you're going to give it curly braces so this is the record you want to update but this these are all the updates so if I if I scroll down and look I can have two updated records here okay and uh but in this case we could just pass two and I think this little trick is uh perhaps a undocumented feature because even here in the intell okay so here we it recognize it and it's saying it's three out of seven here so there's the source and there's the record but what we're doing is we're giving a whole collection of Records okay yeah so um are we ready to hit I wanted to deviate that for a second just to show you so go ahead I'll be right back deviate no no I'm saying I just I wanted to deviate to that so oh okay yeah yeah very good all right so while you're you're taking a little break there I'm going to run this and um I'm just going to hit this save button okay look at those champagne bubbles going across the champagne bubbles didn't even go all the way cross that it patched it fairly quickly yeah um so if we go in here and we click on this uh collection variable okay what do we have here it looks like we still have four blank rows in the first record the first record has data okay so it's got the 5523 so I'm going to I'm going to let you you guys know I I I don't know why it did that um 5523 okay so maybe it took the last one so uh perhaps I I did something wrong there okay so we go through each of these and we we patch the individual record there okay there's the data that we're giving it okay and what I want to do is yeah all of those rows should have um let me exit the full screen mode Let's go look at our data let's see what happened over here so what I'm going to do is I am going to um I'm going go find the ID property here there's the GD and date time stamp and I'm going to add in and um see all column types there used to be a link right here guys allowed me to show or hide columns uh that's sort of interesting that they goad F asked the question would you consider building a full-blown database for an organization using only power apps and a SharePoint list how how many times have we done that yeah I'd say a lot of people do just that because they don't have the premium license ing they have to use SharePoint 70% I heard that I heard 70% yeah um so yeah he's saying the bad thing about is the relationship there no relationships looks up way but it's uh Tech complex yeah so if you do a search in uh YouTube for my name Darren n in relationships I show how to do it and it's like a little seven minute video I cut to the chase I'm like this is how you do it you take the ID out of the primary key and you drop drop it into the foreign key of a numeric type and boom you've got that and how you relate those two is when you're looking at one you just do a look up on the other based on the IDS you know um restream iio just sent a message saying with a trophy saying I've received 100 message today with restream chat so that must be a big deal uh you guys are being you guys are uh firing off restream they're saying they're saying keep going guys you guys are really active that means what we're doing working and what everything's happening is working right and you guys are doing it so it's pretty cool so I'm a little confused what does that mean uh somebody said something about live streaming it's sending them a a message every time somebody no restream.io actually the the the system that we're we're on right now sent a message saying that I've received 100 messages today with restream chat and it's a trophy saying that that it's it's kind of a big deal it's like a it's like a landmark right if you hit 100 messages yeah maybe this is GNA Eclipse our live stream from last week it might it might I think we already have to be honest from what I'm seeing yeah just that just the comments um everybody's just so engaged right now I love it this is the whole purpose of doing during The Saturdays so thanks guys I'm gonna need your help guys uh here because I want to display ID and it's not showing up so maybe I have to go in here and because it used to be right here I can look at it all um so they they changed it so I'm going to go into the view okay the view for this list so I'll go into all items and I'll say edit current View and I'll go find ID now there's ID and open it allows me nope it's not gonna allow me to drag it but I'll make that tried set that to be one and it should move everything down down and I do want to see the GD and the time stamp so I'll make the GD to be three and I'll make the date time stamp to be four and I'll go down here and click okay and hopefully we've got uh something new here and I want to see the theast records that were updated or created okay so if you look at this if only I mean it gave us four records here Kurt but it only has data for one so we do have a bug so we need to um troubleshoot what what just happened there because it almost looked like it didn't um pull in the stuff right didn't do that patch the way we thought it was going to do yeah um so maybe the mai is doing something weird here now I could do a lookup on this um for this specific one here and I could look at because we may not have any IDs yet so I can't I can't do a lookup on that just yet uh based on that field on the ID because that won't do us any good um so but we could say perhaps the um WID no that won't be there as well well well so so are are I guess are we not wanting to do it we're wanting to add right aren't we wanting to do defaults there in that patch is it not just going over the same record four times well this collection that's in here it has four items in there yeah so we don't want to defaults here because that would just add four more rows and then we' okay okay um so we want to get at that underlying row there um and um I guess I was spending so much time focusing on the on the conversations out here I was missing what you were trying to do here what are we trying to do in this patch why why are we doing this in a four could you explain that one more time so what so what we found out is that we got four new records this this this and this and I expected a GD to be in here for all of them a date time stamp here and also the the text of course okay and uh you can see only one record it did patch four records s but it didn't get the data um for for all of them there so we got course and I should probably you know I'll try something I I'll do three or two let's do two so I'll say one there and two there I'm gonna hit save okay done I want to go over here and I'll refresh okay so it gave us these two new ones and it only did it for the the last one okay y um now if I started fresh and I did three one two three let's say one two three save look at that three two three I thought I did one two three didn't I I'm G to start that from scratch again so this one will be one this one will be two this one will be three I want to hit save and it it's something is messed up in in our in our Loop of course let's go look let's go look at that loop again I just want to bring up the last three okay so seems to always be doing the very last one but in the middle 89 90 and then 91 so this is the type of code that I've used a lot in the past and it's always worked but um this is part of the development process everything goes the way that you want it to do you're going have to De debug and troubleshoot uh what's going on there um I'm a little concerned that we're not getting the exact um record that we were looking for there so what I'm going to do is um Ben says looks like the second one is the pattern now I don't know the second line of code the second record I don't know what you mean by the second one the show hide comment was in relation to SharePoint Okay cool so it's the last one I was thinking it's the last one in the P the last one is what's being shown I'm G take off this um Alias for a moment and we have keyword called This Record and I'm going to try that and just to sort of show you what people use instead of the the Alias that I use okay and I'm G to save that and I'm going to run it and I'm going to start from scratch and and we'll add two more and I'll put one two three and then we'll hit save let see what it just did there yeah it's been doing that try to see it's like overwrites that first one yeah it's always grabbing the last one there so even though I said this item still does that so in your gallery what have you got set in your in your items property in your gallery The Collection that com it is this variable this collection variable so if you want to see what's in there look at that Kurt so the first one go is that the one is that the one that you have selected in your gallery is that for going is it I'm just thinking out loud go ahead yeah okay so we know just based on this data here okay this data um so this patch isn't working the way that we're intending I know that the second L code is working as intended because what we see here uh for this variable I need to move this up in order to see it all this is what we're seeing in the in the database um where is the title here we go okay so it is this first uh line of code here with the with the loop and um what I could do is um I'm GNA add the my back in there I like that a lot better um as my and guys know that you can find and replace things this record and say that instead yeah that looks good I think that's good what's going and then what I'm gonna okay what is it complaining about uh full patch hold on you got a comma after that there you go um okay that looks pretty good there okay so what I what I want to do is I want to look at what what we're getting here okay so I'm going to check this my. ID okay and if this thing if I say value on this if this zero it means okay we need to add a new record okay so in that case why not do what you were suggesting saying defaults and we'll say raw data if it's not zero what we will do actually needs to be on that collection um and then here what we'll do is look up doing a look up on call Raw data and we're going to say where the ID equals my. ID and that's GNA give us a record okay so that should work looks good so save it run it clear the collection and I'm going to add two more I'm G say one two three now I hit save and look what it did it created three more which I expected I expected that I expected that um yeah the funny thing about this guys is we've we do this we've done this many times and it's it works the first time the only reason why it's doing that is because we're doing this on we're live we're live that's the only reason why this is doing this it's the craziest thing and people said that they you they they like this you know you know what go ahead sorry yeah they like this yeah M M's coming to the rescue yet again let's see what let's so so are you updating the kod data when you are clicking add new records uh tell me more about that uh minty minty is a um uh he accelerator students he's very smart what's that Kurt he comes in he he helps us a lot in the accelerator program on our group calls it's great yeah I love the interaction so what I want to do after um I I patch it what I want to be able to do is pretty much do what we have here we do the the this thing again and uh and what I want to do is do a select on this button so button create collection okay now when we're done saving it's like okay we done we're done saving there let's do a select and sort of uh reset things okay so let's say they want to uh continue adding new fresh records and that's what the screen is for it's not for looking at records that are already in there now I'm sort of curious did it save the data in here did it save it properly that's I guess that's a good point too okay so we have is now we're getting a two um well that's interesting yeah now this value was was Zero um and all three instances so we should have got three records and we did we can see that there and at least the the course things are correct okay so um so my I got a stupid question if that the ID equals zero is is that a numeric are we sure that's numeric it's not blank would that matter in that troubleshooting okay so here's an ID and there's no data in there so let's say Val value okay um and it looked like it's giving us a blank text so that's a good point Kurt let's say the length of it if that's zero now that seems right to me and usually use length for a string so that's why I was trying to use the value so there we go we got um zeros there and now we will check for the zeros so this is a little bit better I'm going to run it and we're going to start from scratch I want to add two more I'm going to say one two and three now I'm adding in the same order so there's 49 51 52 okay one two three I want to hit save so it duplicated them and then it started fresh okay so I'm going to go back over here I'm going to hit refresh so the last record was 100 so we should have 101 102 103 which were completely blank what did you do Darren look the top three worked yeah yeah and I know how to fix this I know how to fix this guys you're gonna learn about a new function and I don't feel bad at all that we're adding a lot more code to this because this is all memory collections guys this is like lightning fast okay so what we're doing is we're doing another defaults here we got three blank r that we defaults and now if it's blank well we're gonna create three new ones right well what we're GNA do is at the end of this is I could say if and what we could do is we could uh pretty much eliminate we want to do an update of on the collection okay and um I don't want to do an update if I want to do a remove if I don't want those records at all okay do a remove if the criteria will be all the records in that condition okay so if we say that um the GD let's let's check the GD of this if if the length of that is zero um then we're going to remove them okay so before I I start over so 106 is our last record so remember that we're going to run it when I create a new collection add two more rows we'll say one two three with the save button okay and our last one was 106 right so we got seven eight and nine and our these gids are these gids unique and they are so this looks like this is working great what sort of freaks me out is that it actually puts the first one that we had in the G in as last isn't that a a little funny that is something interesting for for me and the way that you've train me Kurt about always having control over everything I feel like I didn't have control over the order in which it was added so what I'm going to do is I'm gonna be I'm gonna try to force this to have full control over what my app is doing okay and what I want to do is I W to I want to sort it okay so I'm G to say sort and I'm going to say the date timestamp it's the way to do it and then I'm gonna go ascending that's funny that's control right there so Kurt approves huh you know what Darren we should do a workshop on this we should we should do a work shop on this I think people would love to do a workshop on this and where actually everybody's partaking and learning how to do this and U you know and actually hav replicating what we're doing and you know it's funny that you mentioned Kurt I was actually plan on doing a workshop I I I just did a post in the school about a workshop I'll check it out we were talking we were talking about workshops but yeah so this is cool yeah let's do do it guys let's do a workshop so here's a question for you guys in chat would you guys be interested in a workshop for example just a given topic uh and I'm open to any topic right but i' like for it to be canvas apps power apps you know um so we're planning on uh doing a workshop and by saying a huge Workshop uh what I mean is huge as an awesome so uh each person would register for the event it'll be much different than just a live stream because Kurt and I will present a topic sort of like this but the presentation would probably be more like 15 minutes maybe 30 minutes at the most I don't know that we have this is the we haven't done one yet so we don't know exactly how the cookie is gonna crumble right yeah but um there's going to be a practical assignment with this okay so let's say you know last week we covered the all the basic everything that you like a thorough understanding of the gallery and then it' be like okay and then we would have an assign assignment hey create a data source put some data create a gallery put headers at the top you know use the you know whatever we could have one for maybe this one and we'd have a workshop okay now perhaps maybe what the workshop people need is like hey I want to have my own tenant you know um Kurt you and I have a friend that wants to get wants to get into power apps and they're from the Zoho um into things and I think the most basic thing most basic thing uh that you could show somebody is well I could show you the basics of power apps but if you can't get into power apps then what's the point right the fir the really the prerequisite to the basics is like how do you create an environment if you don't have one right so I had that thought I don't know if everybody that that's watching would be interested in that you know what that's a great thing I I love that Darren so could you guys just give us go out here in uh in in chat right here just give us the thing how many say say I do know how to make my own environment or I don't know how to make my environment and I just kind of want to see how just because you guys you know you guys are kind of like the litmus test on that so how many of you guys know how to make your own environment and and your own tenant um to do power apps I please let us know yeah and u i created like a little survey out here and in the thing um now this is a link to today's live stream that you're watching right now and um okay cool Oscar says yes and so I think this might be a thing people learn by doing guys so it's like yeah instead of just hearing me drone on for two or three hours let me let me just as Kurt would say give you a spiel about how to use a drop down list okay now I want you to start using the drop- down list and then Kurt and I are there ready for somebody puts up their hand let's say let's say we do it in teams somebody raises their hand and what we just say uh yeah um Ellie you've got a question Ellie you just raised your hand and then um Ellie share your screen okay yeah you just need to change that one little property there now there might be 20 other people on the call that are having the same problem as Ellie maybe they didn't but maybe they learned from Ellie's question and the answer that we gave so be like it' be a workshop and everybody could sort of and I I dealt with this when I was a Microsoft certified trainer I would I would teach Microsoft official you know curriculum courses i' have a classroom of maybe 10 people and uh they're a a a lecture or presentation and then you'd have like an hour maybe sometimes two maybe three if it was like right next to lunch you know and I would go around and help people and and what's cool this is actually probably more efficient because if somebody has a problem like you just need to click on that thing right there and click okay now now run it oh yeah see it worked cool but the people on the other side of the the classroom didn't hear that person's question or my answer so I'd end up having to do the same thing over and over again yeah um and if we get repeating questions that tells us oh we need to put that in the presentation yeah I I love this idea doing workshops and then that way when I get stuck you can help me too and you guys can help me so that'll help so um because I get stuck a lot you know so I'm asking for you guys's feedback um if you guys don't mind click on that link I put it in the chat it should be in the video description as well uh if you go over to to school.com you know our um our free community out here and reply to this there's there's our support email both me and Kurt get that if you guys send an email to that um and there's four things we're asking about topics how long would you like it to be would you like to be an hour two hours of just an afternoon just a morning you know all day long uh and when I say all day long I'm talking about maybe starting at 9:00 am going to like 11 91 let see 101 no you almost need uh let's say three hour three hours in the morning okay so maybe we would start at 9: go to 10 11 12 and then have a lunch break for two hours and a nice mental break too so the the information sort of absorbs in your brain right um and then also that gives you extra time to catch up on the lab if you felt like you were behind um so some people might take it to hour lunch some people might eat at their desk um I might eat at my desk during that time because you guys might have questions that I could answer during while I'm eating eating some lunch you know what I mean so um and it it's gonna be a paid event um but I mean if I offered it free I could we could have too many people coming in and then we wouldn't have um we wouldn't have the bandwidth between CT me i' I'd have to hire you know 10 instructors of uh you know maybe if 100 people showed up or 200 people showed up um so you know tell me what's what would be reasonable uh based on like if you said I want an all day workshop and I want it to be an app in a day I want to know the basics at the end of the day I want to have one it might be a Simple app but I'll create one app right um and then based on a full day app and if you look at you know work shops um that people do it you know they could be um you know maybe, dollar for a three or four day workshop or or something and um I've seen some some people that teach power apps they'll do uh an hour and a half in the morning an hour and a half in the afternoon and that would be three to five days and and they would charge uh maybe a$ thousand dollars for that and I'm not looking anything close to that I'm um it's definitely be under 200 I think I've got a link um let's see here do I have a link I thought I had a link here um maybe yeah I'll get that for you guys so you guys can actually sign up um go ahead there I was gonna say yeah if I mean if it's a full day it might be 200 if it's like everybody just no I just want an hour presentation and maybe an hour lab you know you know maybe that'd be 20 or 50 I I'm not sure but I want something that works for everybody I'm not trying to make it expensive I'm not trying to get rich here guys um I'm just trying to make it reasonable all the way around and I want it to be a win-win situation for everybody yeah yeah I love I love it keeping it keeping it in an affordable situation for um we're just trying to find ways to provide value uh for for our we we we we've kind of created a training center that's kind of what we're doing we're trying to come up with different ways of training people trying to reach people we have our we have our Master uh Flagship offering that's the accelerator program um but that's pretty intense and and and it's it's it's it's not for everybody um and then we've got our personal pocket coaching and now we've got this workshop and I love the idea of this Workshop because we can do this we can get together we don't have to have a lot of resources in it so it's not expensive for us to to put out there for everybody because this stuff costs money you know Darren Darren's gota he's got to pay me and you know I'm kind of expensive he keeps telling me that anyway um I think I'm cheap but but anyway so this is a great way to do it I think um and and and we can and we could bring in people that can't normally do other things like maybe they can't they can't afford the Microsoft training you know it's because it's so expensive well now we can we can do this and maybe we can even do a better job you know yeah I love that uh uh fzy says gu guys guys 200 is a bargain to be able to learn from you too thank you for that fony what an awesome thing to say what an awesome thing and thank you Ellie they already have a dream team yeah um so I I've already created a payment link just to be prepared for today okay and I set the price for 47 um and I'm gonna I'm GNA modify this and put the pay I thought I had the payment Link in here okay and the so right now I'll say to sign up in purchase now there's the link okay so that will be in there and then uh I can tell you right now for $47 there'll be at least a twoh hour session okay where we'll present a topic and so the whole thing will be within two hours okay so if you think about it's like $25 per hour Curt and I charge $250 an hour for our time for like oneon-one typee of stuff but um I feel like that would be reasonable uh 50 bucks to uh Master one little thing now if I get a lot more feedback and say no really this one big topic is like the most popular they say everybody no I want to create my own tenant that's the most important thing and like that ends up being three hours well if you already sign up at that 47 you're you're just GNA get it at that price so um just wanted to mention that and and when you when you mentioned that we should create a a workshop um out of this I'm like you know I'm we're sitting here freethinking this thing out guys we we have we literally fly by the seat of our pants here we're we uh we haven't had time to really talk about this a whole lot we we brought it up a couple times so we're kind of hashing this out right now I tell you d i I really like that $47 for for a twoh hour uh session because I think we can learn we don't have to uh build a ticketing system we can just learn a small part of this gallery and get it mastered so that everybody has some Hands-On training on it because you learn by doing it not by just sitting here watching us so they're actually learning it and we can get it done in two hours I think a $47 is a good value I I think think it's cheap enough for people to afford um you know you can't go to a movie for $47 you know I mean you know so yeah when I order a pizza at the local place and um um you know just my wife and and the the toddlers uh you know I'm looking at spending 50 bucks includes a tip and and stuff you know but um I'd rather I'd be happy to trade in a a dinner I'd rather you know maybe eat it like a peanut butter and jelly and save that money and and gain a skill that's going to give you dividends in in your career and uh you know maybe freelancing or whatever so week uh weekends may be better for an extended duration okay now I was told by my other instructor um he's not available on Saturday afternoons yeah um who which instructor was that uh it was either you or Rick um yeah that must have been me that must have been me yeah um so probably won't be on Saturday afternoons but one of the things I asked is hey what time slot works best for you and um uh my wife likes to have me on the weekends and she she would love the idea of me doing this during weekday okay so I like to get a feel for like if if we had it on a a Monday afternoon or all day mon if it was a full day thing would that be good so Ben think about this in a different way I don't know what your job situation is but many of us could say well you know what this is part of my job guys so I'm got I've got a training I've got a training thing uh this afternoon so you can actually have a two-hour win where you're actually getting paid from your company at the same time you're doing this so um I'm just kind of putting that out there you know maybe your com Mo most of you guys are working for some place and you can say look guys I got to have a training uh afternoon here you know so yeah and maybe just a half a day is as much as you can get away from work but you really do need it to be during the day um that's when people watch my YouTube videos is Monday through Friday during working hours so maybe we should only do like half days maybe in the afternoon while people are nice and awake I don't know maybe we could do some morning sessions but we could have uh like a multi-art like a a three-day long just in the afternoons or something like that so guys this is just a new thing that we're planning on offering so the more feedback you give us the more we'll be able to tailor it for you guys okay and um you know maybe I'll I could convince Kurt on on doing a Sunday afternoon as uh somebody said that you know the uh the the weekends work best but um please give us the feedback so that's what we're gonna that's what we're gonna base our decisions on um and I I saw uh I could be talked in Sunday afternoons yeah guys this is another way and and it's you know it helps us keep the keep the doors open and and keep keep teaching you know this is we're trying to come up with ways for for us to help each other you know yeah so one thing that people may not we don't we don't ever talk about this I'll just talk about it here just in case any anyone's upset with anything okay about what we're doing and actually charging for it um some people may may not realize the the the uh the cost of everything that goes into everything that we that we provide okay so I'm not even going to talk about all the the equipment and the camera the lighting and and all this stuff but I mean some some of the software that's required to to make the business runs um you know if you add it all together there's thousands of dollars every month you know and um right now this is what Kurt and I are doing full-time okay so Kurt uh you know he's he's a grown man who's so supporting himself and uh you know and and I'm doing the same and then we've got the business cost on top of that so I'm not I'm not trying to get rich here guys I'm not I'm not trying to uh milk milk anybody you know in fact I would um i' I'd love to do a lot more like I've got a lot of free free offering everything you see on YouTube pretty much is free you've got um you know the community I provide this for free every community that I have and I've got three different commun I run dealing with power apps each one of them cost $99 a month and I I I think that's cheap you know this Ram service is um I think this 50 bucks a month I think um but there's all these little things and they all add up to the point where it's like whoa if I didn't charge for I wouldn't be able to do it but you know what you're right though um I I do I do like the fact that we don't we try not to we're not trying to uh buy a house on anybody's budget um you got you guys have enough people doing that I mean look at look at all the the the cost of training these days it's just crazy we're trying to have we're trying to create an alternative and and we're trying to create real world so instead of just going out here and getting a piece of paper we're trying to help people learn how to really do it so that you can actually program right next to us how many of you guys have worked with people that have those certificates um and they couldn't program their way out of a wet paper bag but yet you know we're trying to we're trying to we're trying to help you guys so that you guys can actually be that person that can actually get things done you know yeah absolutely there's two kinds of people in this world those that can get it done those that can't there's actually three kinds of people those that can count and those that can't so there we have it that's funny um what what I wanted to mention was the I guys just let you know we're not backing off of the personal pocket coaching that's going on all the time and the our our low price um now I did have an offer that um included a laptop that's still there if anybody wants it um I got more of a response out of this so chances are everybody's got their own computer if you don't have your own laptop go do a search in the community for 747 or a video Daren 747 um and includes almost everything that I offer along with a laptop for $747 if you don't need a laptop you can get it here still this annual payment link is still out here um the idea for for getting bite-sized content from me and Kurt for the full year 265 videos um the original price was 8 894 okay that's a lot of liability our on our end wouldn't you say Kurt that's almost like a part-time job we have to create a video every single day that's nice and and it's it's actually easier to just drone on for an hour than it is like no this need it is it really is it's hard it for me it's really hard you know Professor Kurt here likes to go on and on and on and on hey hold on I love what Fonzi said here to be fair a paper bag would have a lot of variables talking about my uh you couldn't program your way out of a wet paper bag some people can't right to be fair a paper bag would have a lot of variables that's good stuff man I like fony Ellie's got a lot of good comments today um so what I wanted to mention here the the only thing I wanted to to show you guys you can still get it at that low price okay and and you might think well that's not a low price that's a lot of money and I would agree with you that's more than 50 bucks first of all but you get my jumpstar kit okay and a lot of people like that and tell me that I actually undercharge for that that's my my that's my app template that I use for every prod project I do uh the full ticketing system course I was selling this for $1,000 that comes along with this price you're getting bonuses on top of this so you're getting 365 videos from me and Kurt for a full year full ticketing system the file the the full ticketing System Program the MSA file along with over 40 hours of training and you get a uh this says a yeah half hour tutoring session and we we charge 20 50 for a one-on-one session I want to just say that that actually always almost always turns into a one hour Darren and I can't tutor anybody in a half hour we end up doing an hour there's been a lot of people take do this uh PPC I mean I can't believe how many people been wanting to do it and um it's just a big value but then a lot of people do this uh they they book a call with us to do a tutoring session we can't get done in in a half hour We Do It full full hour I when I was looking at that I was almost taking it back because I thought I changed it I changed it here so just to let you guys know that will be a full hour one-on-one tutoring session with me and Ora Kurt okay so that's all included in this and and I'm gonna share that link with you guys okay um somebody's asking about the Discord server we do run a Discord server um now it's not all that popular popular yet but I do have one and I do interact with people on that so let me provide the link for that okay some people really like uh Discord I try to provide a little bit of everything on each platform that that uh people like so um anyhow I'll move this off and i' like to of course we need to get back to get back to business okay so looks like this works and we did the sort so this is looking good to me okay and um I I like how this works okay so let's um there's something that I like to do with these okay and that is maybe I don't want to go up here fonie says I like some good power apps memes it's funny because I created a whole Facebook group just for power apps memes I guess I should talk more about it I it was like I started collecting them on the internet I'm like I need a place to dump these so I don't lose them um and and Kurt do you have any good power apps memes not yet if you go to um Facebook say power apps memes might be Power Platform to be honest yeah this is this is funny May the 4th Revenge the 5th this is this is the May oh I did that on May 4th okay co-pilot I am your father oh I've seen that one yeah that's good stuff use data verse and pay $ five dollar a user or use SharePoint without additional cost trying to pick a data source um thinking about power apps is fun but when you're actually in it this is this picks why you want the accelerator does it not Kurt yeah when you start to create your first not just any app maybe your first app was just really simple but your first app that that somebody's asking you to do you know it's gonna be used in the real world uh sometimes it feels like this right uh customer we need to build an app for a global business where do we store the data sales says excels Excel consultant says SharePoint ution architect says data verse and the manager says buy a license and this guy says yes and then he gets kicked out the window the corporate environment you like that Kurt SharePoint Consultants oh data verse and then licensing nope you can't have that so anyway look at me I am the data source now what's cool about data verse is that you can map in SQL Server tables SharePoint lists ccel it's almost like having a data lake or something what's a platform so hot right now searches uh searches the powerbi forum for two and a half minutes trying to solve my issue impossible perhaps archives are incomplete power apps I've been taking power naps for years bachelor's degree master's degree PhD forklift certification and then there's understanding the Microsoft licensing platform for forklift certifications more than a PhD that's so funny so hopefully you guys like that uh especially you fonsy okay back to the get back to it don't we so what I want to do Kurt is whenever this text box Le um whenever it loses Focus um that happens on the on change okay what we could do is I am going to do a filter on the gallery gallery collection and I want to search where the txt title has a length I'm going to trim it up. text trim it up where the length is zero let me open up this because this is might get a little complicated and I'm gonna dynamically add a new record okay so filter okay we got two parentheses for the two functions there and oh we need to say all items okay there we go I was wondering I was like dang Darren this is something new that the G collection without all items okay I'm glad you're here with me because I might have not it might have taken me a while to figure that out sometimes uh sometimes my brain doesn't work very well um but I want to do a count row okay if the count Rose is zero okay so let's let's do some good intention here nope tab tab that okay and what I want to do is say if okay if it's if there's no rows in that gallery that have blank in there okay then we need to add a new record there okay and how am I going to do this I'm going to select of course I need a comma there too right I'm going to do a select on that control that adds a fresh new one so there's that that's almost like doing a procedure right that's almost like a go-to statement isn't it yeah so I hear my Discord going crazy maybe I got uh a a few people that have joined so welcome guys to the Discord server um okay so let's let's test this out now I'm going to walk through what exactly I did there so I clicked on this text box this text input control and a text input has onchange now you think that every time somebody hits a key on the keyboard while they're typing in that text input it's going to be firing this event every keystroke right but that's not the case it's only gonna fire it once the focus leaves that text box so if you hit tab or something it's going to look and see if there's an a row in there that has a blank for that text box and if it doesn't well we're just gonna add a new one so so what the enter key doesn't do that like if you press enter it doesn't do the unchange either let's try that because I don't know the answer and I'd love to know as well okay so I'm gonna I'm gonna go in here and I'm say course one okay I'll hit new okay that shouldn't have happened created two um and I don't want it to be prepopulated anymore okay so what we have over here got RW data and I've got for the default well the default I want to have um let's just say blank okay let's say blank there and that will give us what we want so we're not going to uh pre uh do anything here maybe in the in the hint Tex I can say uh course 00 one or something like that and I see ammer good morning to you ammer um okay so I'm going to reset I'm going to create this collection and this is a blank here now if I hit enter nothing happens if I hit tab nothing happens but I haven't changed anything yet okay so if I say Z1 I'm hit enter yes you like that I do now if I hit tap oh look it just takes me right down to the next one the key is something has to change though a value has to change I like this this is cool on the onchange fires it checks the onchange check it checks and then it and based on a tab and a key press it'll go look to see if the value's changed and it won't fire so really there's two values go I really wish that power apps listen to me Microsoft please hear me I really wish that they would create a key press event an Onkey press event because then you would have 100% control over everything that's going into that text input box you know do you know that there's a work around to do just that and and and maybe I do maybe I don't so you we need to digress a little bit here okay we have to we have to we must we must because I gotta make sure I don't maybe I already know this but maybe I don't so what you do is you add a slider oh my goodness you add a slider what does the slider do it looks at this text box okay what's the what's the default value the default value is the length that's value I see it nice okay well I tell you why that's that's creative Darren well you get points for that I'm gonna have to give you extra points for that when did you take my class back in the 90s right so so I'm gonna I'm gonna have to give you extra points for that class that you were taking yeah that might bump you up transcript and everything that might bump up your letter [Laughter] grade um okay so this this label I'm gonna have it look at a l um chars okay the amount of chars there now that hasn't been created yet but on the slider I can go into the on change and I could say update context I thought it was going to help me that's an awful lot of work for a key press event there it's awful lot of work experience is what you get when you don't get what you want I'm gonna go over and grab that I was actually thinking a lot of practice typing is what you get when you don't get what you [Laughter] want okay okay I'm going to go in here and I'm going to type in um well this is sort of weird there's already characters in there right and why hasn't the well maybe it is um I should probably okay here here's what I need to do for this thing up here I'm gonna say uh slider I don't know if it's slider one it's actually slider two look at that slider 2. value okay so I am going to put there okay now you wanted an an unchange event Onkey press event key press now can you tell what key been pressed at that point Can you capture the key press sure because that's what the key press event does is it captures the key press and it gives you the Asia value of it yeah I don't you probably not gonna like what I'm gonna do here well I mean it's it's something that's different than not having anything at all you see there's an e there one two three so it's giv us the LA it's gonna give us the last character there now I could go back over here before the D and hit a dot dot dot dot dot and if not going to put a dot here so what you need to do is have another variable that will you'll compare it find out what the difference is and display that one character difference um but at that point I feel like we're digressing too much yeah we are but but yeah okay so so there's something that there there it is but I still kind of stand on at Microsoft there even though Darren's found this really cool workaround I would really like to see it Onkey press event in your text input box that would be nice yeah give us all the events right right and return and the return of that would it would have the ask value of the last key pressed yeah yeah absolutely um like having parameters being passed into events that would be good um and Ben says I love the exploration of this fine detail absolutely yeah says this is exactly how development went it might work experiences what you get when you don't get what now I I didn't come up with that quote but I made it profound but he made it profound okay so guys we we pretty much did this thing now we had we talked to someone named Aaron uh last week right didn't we two weeks ago and they needed to know how to do that dynamically add new blink rows now my question to you Kurt and the viewers have we covered that is there anything that's related to that that we also need to cover in this session so can we go back again and do it one more time just to make sure because I want to see that we did it let's have let's okay so it's okay Darren I hit tab Kurt enter and we'll say Ellie enter tab now you just made me realize something okay when you asking about hitting enter Kurt that is so important here you know why because if I had just done um us one and hit a tab okay it did create that row just as I expected but what has Focus that the the user one still does no well within window like my car see the carrot isn't blink is it the carrot or a cursor I don't know okay but you know how like if I were to click in here I've got a blinking got it yeah okay car cursor right now if I hit tab T now it's going to go down here let me say user to because I want you guys to realize something if I hit tab it did add the additional row but do you see this thing in the upper right corner of my screen says close preview the browser this thing up here in the browser got the focus so if I were to say okay user three tab I can't type anything even though there's another record down here right right so user four hit enter enter then tab there you go if you want your users to be able to mass add a bunch of Records that's how it's done okay okay so for the purposes of this video because because this is going to be seen online and you can also accelerator students will be able to go back and see this video right yeah yeah so could you put a label up there and and just tell them what you have to do to see the next thing so that that way it's in so that you can flag that that's really important here man yeah yeah to do data entry quickly I would actually say not two users to enter data quickly and not have to use the mouse when you're done with a row press enter then tab very good now that's up there and by the way guys I'm going to make this this project file available to you guys and I'm going to put it in the school environment so and I'll probably also put the link in the video description if you're watching this on demand after we've uh Gone live um love it so Ben says the close button seem to have focused yeah that's that's a possibility so if I click in here and it tab close preview mode oh The X got focused do you see that that would be disastrous if I enter there it got me out of run mode Kurt I'm learning all kinds of stuff so if I'm running this thing and I hit tab right now I hit enter that's the quickest way to go back to design mode so you know like we're talking to somebody it's like okay we've run it know that there's still a bug hit tab enter tab enter now if you hit enter tab it goes to the next record you know but if you hit tab enter it's going to take you back to design mode now until Microsoft changes it up on us right right very cool man so uh so yeah I think so now the only thing we haven't done is we haven't deleted but we really don't need to worry about that maybe um because really that's a simple situation throw an icon throw a trash can icon on that thing or or or something um I think we should I think we should add that real because it doesn't take very much time at all so if you say h trash do a search for trash We'll add that over I always like this so they realize that there's something possibly bad if you were to click on this and you didn't mean to so I'm G to make it bright red I like Maroon better for some reason red just looks like it clashes and then I'll give it a little bit of padding maybe four pixels okay there we go now there might be a scroll bar there that might get in our way now how do how would we remove an item now this is getting really small Darren just to let you know so so make sure you blow up a little bit yeah okay so we got a at 150 I'll go full screen and I'll also move us around okay there we go there you go there you go it's a little better so to delete use the function remove and I don't think there is a delete function I don't think so so like I need to delete data there's no way to delete it well it's remove yeah it doesn't sound as bad does it uh and the remove we're going to do the collection because if it's in there it's not in the data database yet it's just there in the in the collection okay which one this item item this item now let's test that out and see if this all works right so I'm gonna go yeah I want you to test a couple things I've got one more thing I want you to test after this too so okay so go ahead can you delete something sure I'm gonna say one two three four five six seven tab of course it's going to create one more for me and I'm going to delete Del all of the evens so there's two gone oo o that's a bug okay you weren't on this item this item didn't register you weren't on the select you know what you didn't do you got to do the on select you got to put the select parent in that uh text input when you go into it oh I've got right there oh you got well that's in the remove but you didn't do it in the okay so the gallery does have an on select and I don't have anything in there but I don't want to delete anything if they just click on a record you know something I will do just to I do this for all galleries I probably should have added it but um if I I hate when you got intell us since you hit Tab and it takes out what you add there yeah very annoying okay this item do is selected col. light yellow so now we actually know which one's selected now the this item this item doesn't care which selected it's going to deal with the current record so I was going to delete all of the evens but because it deleted an odd I'm going to delete the odds so here I so the first one is selected and I'm going to click on three oh my goodness gracious this is something else this is really weird well it it did the top one that you were selected on right yeah okay I'm gonna click on number four and then I'm GNA click on the remove it it's always deleting the first one so we've got a problem this item we got a problem uh how about we do oh wait a minute how about we do the name of the gallery do this it it um I'm open to that I don't think you can reference it like that um the name of is gal collection do selected do this item ah how about well okay what about selected though selected that's what we wanted why did we I knew that be selected right there right right but that's what I've used that before I've used the this item and it's it's worked before so I don't know what's going on there this this is going to work Dar yeah all right I'm goingon to I'm going to go to seven I'm not going to select the first I'm just going to click on the trash icon oh was not found what well we're not deal with the data source right we're dealing with the collection I tell you what okay so the gallery is not in the wow wow only because we're on live stream folks this Happ this is like something we do every takes five minutes every day we do this oh my okay I've got something for you yeah yeah also in the loop remember in the loop I was trying to do the the my and the this record and it wouldn't take it yeah guys they're changing stuff up on us there's something going on they're gaslighting us guys they're gaslighting us they knew we were gonna do this okay all right wait a second This Record instead of this item okay well I I have to know I have to know so I'm gonna try that out real This Record shouldn't matter it shouldn't I've never used this record and it I've worked this many times so you you know how I I create a loop and I say as my if you don't use an alias like that you can use this record and you'll get at the existing who you laughing at who's there uh Shirley just got me give me lunch yeah oh nice did she cook me some lunch too I'm gon I'll be over right after this okay I like her cooking you're only two hours away only two hours two states two states two hours five states so we can't use this record in this context no this item is Gallery right and this record is database um do the look go ahead what I was just gonna say do that lookup finish that lookup I think that's gonna work so I just wanted to respond to to foni here here in this thing if we didn't say as my we could use this record here and I was trying to use it up here in the second parameter um and for some reason I think they've changed something in here and the good thing that I used used to write my code this way before because now I can always fall back on this workaround okay what I'm gonna do is I'm going to do a lookup on this collection and I'm gonna get the exact one I want the criteria is well we got gids now in here so I should be able to say something like uh this item. lbld do we did I call my uh yeah it's lbl GID okay and it's not going to allow me to do that um no what do do the this item dot selected just try it right there in your Lookout dot or I'm sorry uh selected do lb R not is selected selected nope so so do Gallery one. selected about self what about self selected I can't do that one either do the gallery name. selected man I really don't like this code now lbl gwid there we go text there you go okay now what is the uh data type data Tye I think it's it's called GD okay that should give us the record guys it should do it the first way should have done it too by the way just putting that out there I think they they switched things up on us all right I'm gonna try to delete six and nothing happens really I'm going to try to delete five no okay I'm going to click on it again again no well this is a learning moment huh guys I'm Googling this yeah please do this guy this guy Shane has some really good videos what's funny sometimes people will email me and they they say Shane I love your videos and I'm like Shane does have good videos but I'm not Shane um okay okay so you know what I could do a remove if remove if and this little thing becomes the criteria boy it doesn't like that you should just be able to remove the selected item oh you could say uh in your in your criteria put is selected Gallery dot is selected okay I I had remove it I had the if um the casing wasn't right powerx is a um case sensitive so I'm gonna I'm gonna delete 7even nothing yeah remove if yeah wow I'm I'm I'm a little surprised here um can we simplify that GD and comment that line out and then put another line in there just say um is the gallery dot one do is selected the gallery name do is selected oh now I can't have it huh um well if you want to get it is collected or um would you say is selected you have to say this item do is selected there you go and that's going to give you a true false okay there we go yeah so i u i see funy what he said yeah that's that's what I was using so this is the data source okay it's an in memory collection and I've I've done this before and uh yeah this item that should work um but then of course that's for just the regular remove not the remove if and what's going on here so if I run this and I try to remove seven it's probably going to remove four you see that so I've got a a 567 and I select this and go look at the data source I should see 567 on the ID um in the text oh it hasn't been updated yet oh okay so on the I think I know what's going on on the on change we do that but guys this data that we've been typing in here it's not in the collection yet so what we could do is we could call this save thing here on the onchange select okay this makes sense this makes sense now I'm going to go in here and add a number eight I'm going to go back over here to five of course it it it saves it all and it removes it all um is that what I mean it depends on what we want to do here I mean we didn't have to clear it out um but if it's saved it it goes goes in there but maybe they needed to update it before they save it um okay okay let's not run that on the on change okay let's not save it there let's work with this collection because that's what we need to do right back okay I know what I need to do here on this thing here I do want to do a lookup I want to do a lookup for the collection okay and I want to say where the um [Music] El bd. text equals this item. lbo no update context I'm going create a little variable and I'm going to call it LO delete GD here I'm going to say this item. lbo GD lbl g. text okay so I'm going to use that this is interesting isn't it it's a puzzle isn't it see yeah the issue is um we see data in those two labels and we see data in that text box but it's not in the collection it's just being displayed for each record right now when we save it it does it it uh saves it off it saves to the collection then it saves off to the database and then it clears it out so what I want to do is get at this is gonna be funny I'm GNA filter the gallery dot all items where the lbl grid. text equals my L okay but I'm only interested in in the first one y and it should only be one as well but this remove is looking for a single uh record okay now how do you guys like this for low code no code huh how how do you like this so so this is you know I'm telling you uh you have to do this more times than not many of you guys already know that but you know when they say you know this is a low code no code boy I tell you what that's a marketing tool it's a marketing tool to keep programmers in [Laughter] jobs all right let's test this out let's let's make uh make sure okay so I've got one tab okay I gotta make sure I click in there okay two enter tab three enter Tab four enter tab okay five enter tab so we got five all right there's two and we got a GD over there delete two ah okay okay the record wasn't found wasn't in there yet right control it shouldn't be a control it should be the text in there quid yeah it says that there's a control in there that's really strange yeah well I'm going to force it to be text I don't know why it would do that okay so we force it to be text believe number two record wasn't found Ben says the meme of different error message comes to mind right about about now yeah exactly or the meme it works fine on my machine your problem all right so we are making progress here so if I select this this local variable it says 2 c 2 CA okay so two okay so it's looking at the very first one okay so should be deleting the very first one and there 's the label text Toca okay so that should line up fine and then I said just give me the first one so if I do a count on this so if I added a label to this screen I put it at the well put it inside there add a label okay and I put this down here and I say count rows for that look at what I got I got a one and and you know if I'm doing the first I should get one okay so that's the one I'm going to [Music] delete did you make sure to carry the one I always forget to do that in life you know it's kind of like you know when when you got to drive over to the next town and you didn't you didn't fill up with gas before it was on E and you ran out of gas you go should have carried the one should have carried the one so we're doing a filter there where these things line up a a fe yeah so we're getting a record here okay the specific record was not found man they really changed something up with the remove function what I could do is I could go back to if and just make this and it actually simplifies the code to be honest or you could put all the items in the collection before you delete something I don't know I don't so we're going to remove that where these two things match up so I'm going to try to delete to oh my goodness the funniest thing that's one two three enter oh my goodness made my blood pressure go up all right all right these GDs are different right they are different they are and uh Shez all right I'm G to put another label over here and I'm going to see what the uh the local delete gwid is okay so there's the local uh gwi Delite and I can make all this stuff quite a bit bigger here okay so everybody can see it so it's a a which is not one of these yet by the way shell says at least I'm not not the only one stuff like this happens to yeah that's that's why this is a good thing yeah so if I I'm going to try it one more time in I I think it's going to delete everything but if you look at this it's going to delete anything that has the GD that's down here now if I click on it it should set this GD up to be that which just clicked on so if I hit two it clears everything out wow we have got an issue okay what I I think I'm gonna do is I'm going to on the click event I'm want to do something like this right here I'm gonna I'll cut it out of there and I'll put this thing on the on select for the record okay so if I try to click two it's going to select that record update the local variable and nothing nothing happened I'm going to try to click on it again when it cleared everything out of Aid was still being displayed when it cleared everything out so the first time I click it it puts the thing in there I was clicking on on it we're trying to delete it it hasn't been saved yet P says I think we need to remove it from the gallery not the collection well it's bound to the collection and um I don't know I I don't think that would work have you ever tried to delete something from a gallery CT from all items you might be able to delete it from all it I don't know I've never really tried that never tried that as well I mean she was I'd be really surprised gal collection. all items doesn't like that comma comma oh oh no so if we delete it from The Collection it would delete it from the gallery if we add something to the collection would add it to the gallery I like Fun's question where does the dat dat where where does the data we are seeing reside if not in a collection it's just residing in controls they're in these labels so the gallery collection has these labels set up there it just repeats that first control he's got that text or not label I said label the text input box um that text input's got like four different text inputs it's just sitting in that so so to get at that we have to use use the the Gallery so so somebody said um gallery and I think we've tried this right do to remove on the collection the one that's selected okay so I'm GNA run it and I'm G to say one two three just so we know what's going on here okay so I'm going to click on the third one and try to delete the second one now when I click on this icon it should select collect it okay specified record was not found so this is what I I think Darren I think what we should do is when we enter upon entering when you you you leave that record that line you should enter it to the collection at that moment okay and then that way you've got it you it's in the it's in the collection okay okay so in order to do that uh do we want to bind that to the on change event for the text box yeah just do a simple collect on that well all those rows are in the collection they just haven't been updated right right right right right just got to patch it just got to patch it neon change okay so what we're going to do here is we're going to patch The Collection second parameter patch well want this item that's the record we want to update and then we need to do the curly brace thing here and what we'll do is we will say uh title um of course I'm gonna need to go copy yeah right there that right there that right there what yeah yeah if you're ever inside of a template like this guys you don't need the this item yeah you could just reference the controls all right okay yeah so when that changes we're going to patch it the collection okay I'm going to start start off and also um I'm hoping at this point the this item would work you know what I mean yeah that's what I expect it should work now so I'm going to start off fresh and I'm G to add two more I'm gonna say one two three oh see how that's messed up what this is interesting man um now if I change this 11 uh 22 three three it just keeps adding them Kurt um maybe maybe on change isn't the place to do that maybe we need to focus on the gallery select maybe the gallery on select event when you click on you go into something we need to save everything that's in that Gallery um what I don't get is why doesn't this work this this item this should have never be a defaults it should never be like a fresh new record you know what I mean okay that's well what maybe happening is you're doing a select Ico new new row maybe we're firing that off every time in here whenever it's doing when it does the patch it's firing the onchain somehow and it's and that's why we're getting a repeat maybe something okay so first of okay so this thing was coming out so that's not running so you said we get that new row there right um so foni says I think we need to patch the collection on change now that's what we're doing right here we we are on the on change but it's the on change for the text input okay so the Galler only has one event it's on select so it's like the on change for your primary column of input is really needed because I could enter something and then click on this label up here okay so a you know an on select event won't even happen for The Gallery at the I mean they're that's the only event you know what happens if we just comment out that second section of code for a moment just do the patch in there um okay for the on change yeah okay let's just comment that section of code out just for a moment and see what it does sure all right uh coffee yeah you can you can recover a Kurt from his little bit of of humor there Kurt Curt and Darren humor for the price of a cup of coffee all right so I commented out this um this thing right here okay so it's not gonna add any new it's just gonna patch it that's it yep let's just see what it does now I'm gonna start from scratch of course okay just one oh two three okay we got something else firing then here we've got something else firing on select what are you doing something's firing well if I go in here and change I put 33 and then I just click on something else [Music] oh it's updating the wrong ones 33 3 3 three tab okay 11111 so there's another solution we could we could create a record as we're going into it so create a create a item in your collection with defaults and then you're filling that in instead of the patch on the onchain so when you create the new record you do you're actually in the collection you know what I think we should do we're creating a new record I want to update the GD we need a primary key because right now I think it's confused because it had the primary key is ID and we're not going to get that value until we go into SharePoint and I think that's something that will mess you up if you have no primary key and you got just a bunch of blank collection doesn't know which one to update even though we're telling it which one in our own way I'm going to go in here and say GD I'm going to update the GD with a new qud okay and then for GD I'm not going to put that in the label I'm GNA say this item. quid that should work just fine and then when we delete I'm hoping this works at at at that point and it may not clear collection clear collection doing a collect here we do a clear collect and then we do a select on the icon new row then I go over here to new row icon new row and the code just does a it adds one to it okay so if I hit clear this clear isn't did does that have a clear clear or a clear collect over there on that it has it should be clear collect and that's by Design okay but then you're going to go over here to the other select and you're going to do another collect that's going to add another row right there so okay so well if you look at this I'm following you along here Kurt so the clear collect We Know by saying false here that gives us Zero Records right oh right right right just have schema right right and we go over here and we're just doing a single collect so we should only have one record when we click on that button now so what's it giving us on that filter false maybe he's putting a record in there man okay I'm gonna comment that out and see what we get now man we are down a rabbit hole and guys this is how debugging is it's like you've got to fix but the fix is got a bug and you got to fix to that that it's like a Rubik's Cube you're like I'm going to turn the Rubik's Cube this way and I'll get these all the side red but then you messed up all the other two you know the other sides that you had I'll hit the button now we've got no records nothing so you either get two records or no records but there is a collection there and it's got the schema now I'm gonna click on this button now we've got two two records so let's look at that button collect Rod data defaults rod data oh look at this C put an empty record in there I did defaults on Raw data I I bet there's something weird going on there not Caron did and now it's gonna give me an error defaults oh I put a V when I was pasting raw data I bet that fixed it no of course not oh my goodness what's another fine mess you got us into here Darren it's yeah and I plan on finishing this up defaults on that okay and then we give it a gwid oh my goodness we could do you know what we could you know we should do a patch there because yeah maybe the collect isn't working the way we think it's working with that with that default so if we do a patch with that maybe maybe that'll be better because collect is just a Brute Force putting something in so maybe it's doing it twice right there all right so I'm just GNA do that okay I'm gonna run it hit that hit this once all right I'm gonna patch now I'm gonna patch that one how do I patch that one you got your hand up or are you oh no no I'm saying get him Dar say gidy up gidy gidy up Ellie giddy up Ellie Kur somebody might say this is the Ellie show and I welcome that today today has been dedicated to Ellie if you're still here Ellie she's here it's been quiet so she G she gave me a compliment on my blue eyes all right so moving on um all right so we got that one now how do we okay I I need a reference to that that item right so get this Kurt I'm gonna say update context and I'm going to say curly braces and I'm going to say l l new row and that new row is going to be the defaults okay I like it now I'm GNA put that there now I can patch the call all data what record my variable yep now what are we going to do we're gonna say GD equals a new GD oh I need curly braces right so Li asked why using defaults with collect you are collecting two records um so the defaults what we're trying to do is we're trying to put a blank record with that data structure in that's what we're trying to do with that defaults yeah rate the collection give me one oh all right let's do this do it without since here's the other thing we could do it without the defaults because we've got the records being defined we could just say collect and then just put that whatever you want in that Curly bracket up there but you want a blank record man that's well I don't know I don't know so rsh says patch call uh rsh I think that's what we we tried just a few minutes ago why using defaults with collect yeah you almost need to map um I wonder if I patched the last the last one that was entered into that collection and I want to update that that that shouldn't do it right start over add one oh my goodness gracious so to answer your question why collect and Patch both the reason why is because what he's doing if you look at the the gallery there he's got several several Fields across there so what we need to do is we when we're doing the uh defaults we're trying to add a a structure that's got all those fields in there but they're blank and then he patches so that's what he does the first thing and then he does a patch on that just to put the gwid in there so that that way it's got It's got a context it's actually knows which to go to when he's later on trying to save it that's the purpose of doing the the both of those look at this Kurt GID zero oh boy I didn't I didn't call my column GID zero I bet you that every SharePoint list has got like a little hidden column called GID I bet it does so let's rename it let's re you're gonna try to tell me that this is all because of that we can't we we you know how we we hate to rename Fields right yeah in SharePoint so we got to create a new one yeah I'll call it my GD I will laugh if that's what's going on okay so I'm GNA create a new one say m it's going to be single line of text so we've got that I need to go over here and refresh what hour just for that if that solves I hope I hope it doesn't because I'll just be angry about that we got bit by SharePoint yet again yeah SharePoint should say hey that's you can't name it that and not try to create some weird underneath the scenes right but they do that I have been bit by them so many times so it's funny I refreshed the data source and okay I'm going to delete the this other one just called GD yeah so it's not even in there so I'll get errors and then I could just fix all the errors okay and now we'll refresh well hopefully you guys are are uh learning some troubleshoot stuff yeah we got some uh things to fix here look at that GID zero ain't that funny wow I GID patch what's wrong with the patch invalid arguments sort uh that date time stamp it's probably got some kind of a variable name with it get the length of my GD there you go there okay and I think that's just temporarily broken because the maybe I need to rerun this to get the there we go oh now we only got one okay so if I hit that and then one no you still got two what's wrong with the sa let that patch oh GID zero oh my goodness okay I'm going to say GID zero and I'm going to replace two there were two other places that said GID [Music] zero this is th this just isn't this hard what not supposed to be it's really not man okay so we got my GD there and then we got a blank above that so okay what if I were to do this comment this out yeah and I'm not going to mess with this either okay I'm just going to say defaults on the collection MH then I should be able to say my GD where's my intellisense at now I've never seen collect work like that before but maybe it okay yeah here we go and then here we're gonna say quid now that should work there it is there it is oh my goodness so raes maybe Ramesh was on to something here he was all right one two three and four now does this code work delete two it works oh my goodness so I was I was writing that we had to put it in the collection first and then but boy we had to get around the the the merry go around a couple two three times on that one didn't we so what I suggest we do first of all for you guys that are watching this we're not done yet with this this um but we're done for today but I think next week we need to finish up some more of this thing there's a lot lot more to go and but before we do that maybe Tom or tomorrow maybe next week Darren this is what I wanted I said all that to ask you this maybe we can go ahead and just kind of review what we did here just so that and review the code and re and lay it out so that people can kind of see it because we got kind of choppy in that whole thing right trying to solve it you know now we haven't saved it to the database so let's let's try out this one3 hit save well didn't look good that did not look good so I want to put the code back in there okay so we've got this clear collect I want that thing to be selected okay yeah yeah clear collect we have one I'll create a second one so I'll say one two now if I hit tab it should have created a third one for me to be uh coming out that code we did we did okay let's make sure we we actually have for for the stuff that we've done so far it's pretty much bug free before I upload the the document stuff sure yeah so we got one and then two there's three tab see it's not creating the um the new one new one we's see what's going on there um it's icon new on the on change I think what we need to do there it is there's the select if there's no records in there that has the the title you know we need to check is what's that that count no the length of that there are no records where there's a blink item it should be it should be doing that there it finally happened it's not I say 22 it has changed I hit tab but okay this makes sense because there is at least one in here that has a blank for this text so I'm going to say 44 tab tab tab tab tab tab tab tab it's like it didn't fire the change event for that thing four three two one press that when you what one tab well now we actually have that okay so go back up here one tab so it's it's like like the onchange event is only occurring on this first record now well we almost had it guys this is where you like like you know 10 five minutes ago to like all right boss it's done or you sit off and I got a torque I got a twerk and they go in there like no it doesn't you know they'll find another bug okay so Ben says it started tabbing through the side menu okay and um okay so if I say six and I hit tab the onchange event you see it says close so the the focus went up here but the onchain should have happened right there yeah okay so what I'm gonna do here to how to debug something say well first of all did it happen so I'll say notify I'm sorry Darren if you press enter does it change did you try the enter key I'll try that in a second um just changed okay and I'm going to say six tab just changed I'm going to go five I'm going to say 55 and now I'm going to hit enter just changed we should be getting new a new record there okay patch that's on select so this code should be working so I'm gonna I want to say notify and say icon just selected so we'll see if that actually happens okay so if I say four and hit tab it just changed 5555 enter just changed yeah this icon really isn't being selected nope as we would um condition in there I mean if I copied this code I mean it really should be happening and I put it right well I would put it right here instead of that select so that that if condition is not working then is it something it's changed I hit the button it creates one is't that weird I question your condition in the on change have notify function there to debug okay very good could do that and what I could do here is do an Ellis block and say notify I'm here block start fresh icon just selected okay one one enter just changed okay now we knew like the first one the the the onchange for the first one would work but on the other row it wouldn't enter on the 22 there's the else block okay yeah so you're you're right there remes so we're hit why are we hitting the El block cat Rose is it working the way we want it to filter yeah right or the filter isn't well let's do a can we find a way to what find out what count rows is every time it comes through yeah could actually yeah fact I'll put that right there be right back three three waiting for that notify to go away get away go away tab two tab so it's giving us a one supposedly there's one in there that is plank okay 3 three tab it's giv us one there is supposedly one in here that has a text box with a a negative uh you know nothing in the text box which is which isn't true every single item in here so why are we getting a one I'm going to put the right yeah Rose 101 enter now there's one 22 two tab now there's zero down here isn't that interesting okay I think for a split second it says one I think that's what's going on well and it makes sense because on the first one there's Zero Records where it's blank so it does work the that first time now the second time says there's zero you know what I'm want to say is I'm gonna say greater than one greater than one start fresh I'll say one tab two tab three tab 2222 tab oh no 33 tab but what's weird is we always get 44 tab five5 tab life life being a developer is hard because this is where you wouldn't be able to sleep at night yeah you'll leave your office and talk to your spouse hey it's time to go to bed yeah what's wrong oh I I didn't res I didn't fix a problem or you know your mind is like it's like a puzzle it wants to to figure it out and I don't like sing right so remiss the idea behind having the condition inside that filter is that you want to check to see how many records you have we're looking for blank records so if somebody's got like a blank record up there that they're editing you know we're going to assume that they're trying to get to that but if there's nothing out there that's empty we need to add a record you otherwise every time they press enter it's gonna okay I just tried something different here so on the one the first one change okay that works 2 two change it works 3 3 3 three change it works now I'm going to go back up 2 two two two change okay looks like that works I oh no I thought you had it Darren incred is going you know what I want to do this will be interesting Kurt I'm going we what did we learn earlier today slider boom we have a slider we're gonna do a key press event and I'm going to say the default is that and on the on change y that's a good point raes um because we were doing that we just we just shifted things to the collection we haven't shifted the the filter what about if we check the collection instead of the gallery if you check the collection up The Collection isn't gonna have it until we hit the save button at the top of the screen that's why we can't do that okay all right so I'm gonna pretty much get rid of this because I think I've got a better way of handling it okay here we go only thing that the onchange event does is it patches the item and I don't want to update the GD it already has a GD so I'm going to take that out okay it's gonna update the timestamp and whatever title that they put in there and it's just going to update the collection so I'm going to run this from scratch no oh boy did you do you see that it's still running Kurt all right the max is going to be uh [Laughter] 10 so then I'm G to go over here on the on change and put that back in okay um and then if it's more than that's the default number and then what I'm going to do is I'm going to when changes unchange but every time I add a new one it was firing the change event right so um yeah there's like a it's stuck in a loop um what I could do over here is I could look at that that okay I've got an idea which is where the length of that is zero sure Ben says Curt is giving me the munchies I and I've been so hungry for about I got I got this great big mushroom swiss cheeseburger thing given to me about an hour ago and it's just been taunting me all right I'm gonna cut that out because this still caught my Loop okay yeah I'm getting hungry now too we were doing so good until I said well let's do a remove and that's just all you're right it's all your fault Kurt not everything's your fault but when it's your fault it's it's really my fault yeah Shame Shame Shame remove didn't you Kurt just had to the remove um yeah okay we have 186 items in our collection we've got um so Logan says just join what are we in the middle of doing would you care to try to answer that I don't know um you know what if this is over in this patch if come if that is over one if it's less than two then do the patch wow C collect one one two two 3 three 5 five okay so it's G oh but there's like an extra one isn't there I'm okay with the extra one if it's consistent the users won't like it though users won't like it you know the users or the stakeholders somebody you just let them know when they say hey there's a there's a problem you say no that's that's a feature that's aater that's what you tell them while you're working on it and then all right so I okay I'm starting to scratch we just have one and I'm gonna say one okay now I'm G to hit tab okay we got a second one okay two tab three tab all right now I'm G to go back to two I'm G say 22 tab oh Kurt I think it's done I thought Kurt was a vegetarian vegetarian vegetarian I'm I I've changed now since this this program made me change y i i to be not anymore it's good thing I don't drink got the power Darren who's got the power I got the power all right guys um well I hope to see you guys over in the the community and um I'm just going to pop this up here and and so we've got Dynamic adding a blank rows inline editing isn't far off nope I mean we're sort of doing inline editing right here we got the text box we have an onchange that does what it does a patch on the collection yeah well what you could do is on that we could call this save okay and in in in inline editing you probably don't want to like I mean we are saving you want to do saving and inline editing but um you probably don't want to do a you know this remove if and like clear it out you know what I mean right uh I think we do we clear everything out on the the crate call so I mean if we took that out and I were to run this and I were just to hit save okay we got well we got duplicates and stuff so the the um inline editing we we'll need to do uh something and and take our time doing that and not tired to piggy back that off of that so um that'll probably be the the the next one there I do have a favor to ask of you guys though and YouTube thinks you're going to like this video next let's see if they're right anything helpful out of this a comment or even a like really helps the channel and that's people like you know this is a good content much appreciated I I first clicked on the wrong one then I clicked on the right one now I'm going to click on the other right one 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 auto
Info
Channel: PowerApps Tutorial
Views: 2,939
Rating: undefined out of 5
Keywords:
Id: Pu0deIGEmfw
Channel Id: undefined
Length: 198min 1sec (11881 seconds)
Published: Sat Feb 10 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.