Common Data Service (CDS) Relationships in PowerApps (Canvas)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
well I was thinking you know we've been together a long time now and I've been thinking about your locker in lockdown but starting to think that you know you and I are the same we kind of communicate really well really good together but I think we need a relationship I think I'd like to start a relationship with you like seriously what you mean you're not ready for a relationship you mean you don't do relationships breaking my heart hey power APIs so today I really want to talk about relationships what's the relationship we all know what one is at least we think we do but in terms of data what's a relationship so there's lots of data sources out there that are relational c.d.s is a relational data source and when you play with CD s you're going to find relationships that are a cut above the rest why well you know sequels like super relational database extraordinaire has been since the dawn of computing right but the difference between sequel and Pat and CD s is how the data is rendered inside of power-ups and what you get back from your record when you call it in what a caution before we go any further talking about relational databases don't try and build a relational database in SharePoint you can kind of fudge it but you're just going to end up with sticky fingers it's not a great experience and it's going to lead to problems later on sequel and CD S is the right place for relational data so put it there put it where it belongs the difference between sequel and CD S is that what I call the record into power-ups let's say for example a book right I've got a book record in two parents I'm gonna get back some additional things so I might get back the author of that book and I'm not just gonna get back the author of a book in one flat bit of data I'm going to get the author as a relationship so I can see a bunch of information on the author and I might even be able to see the people who have read that book or that book has been sold to from a shop and I'm going to get those children back and I'm going to be able to easily traverse between the book entity the book record right I'm the child record all the parent record right that is very very powerful and reduces the number of filters you have to write the number of lookups you have to do the number of calls to data sources that you have to do it's going to make your app run faster it's going to make the user experience better and you know you're just going to be able to do so much more faster and easier and better all over and just everything's gonna be cool so let's get into it but Before we jump into power apps we're gonna look at data and we're going to look at how to structure it because I've found over the years that before you do anything in the CES you need a plan and some very clever people have been very kind and help me understand those plans and how that works that would be mr. hunting furred and mr. Rory Neary and like a whole bunch of other amazing data people out there Kimberley Morrison you know talk to me about data maybe understand data and maybe understand a soma largely and I'm going to share that with you as well so let's get into it so let's talk about data before we talk about relationships most data that you're going to come across in the world is flat right and it's our job when we come to encounter a relational database to break that data down right so let's take a list of books for example and here we've got some some fields and and some of those fields repeat and some of those fields are naturally kind of parental or grouping fields so let's just take like author right so if you think about it like we've now got some book data which is going to be fairly unique to each book and then we've got the potential to have some common data with an author which is an entity in itself so that's how to think about entities within a common data service like they are things but let's take that one step further right so we've kind of like we we now that this there's more to do it's not just that one thing and this is where you really need to kind of plan your data out with the common data service and you need to do this ahead of time because if you don't make something a related object now it's more difficult to make it one in the future you've got to do a bit of a migration a bit of moving things around so it's really important to plan out your schema which is the shape of your data now upfront and you know that's not to say it's difficult to change it later on it's just more troublesome so yes there are times where you build an app and you kind of building data at the same time but generally this is the best kind of way of doing it right so I'm going to go and check that out a little bit more so I've got um my book data and I'm going to think about you know an author the categories and genres a library and a language right and they're going to be our kind of parental objects these are going to be in sort of above the book record as it were in a diagram and this is this process of breaking down data into pieces it's called normalization right so let's just look at relationships now what's really important with relationships is how you draw them out so we've got our book we've got our author we've got many books to one author and this many-to-one one-to-many many-to-many terminology you're going to hear a lot when you start talking about relational data there's even a way of drawing it out right so you you kind of draw your entity and you draw your other entity and then you put a line between the two just say that they're linked and then you kind of draw this funky little thing that says like there's potentially lots of these and books over here and then you put like a line on the on the other end of one because that's kind of delineating or why on the Orphic now there's a lot of other bits that they put on here they they have like one or many so they'll do like that the little 3 tripod II thing and a-line is one of many and they're the zero on the line as well to say none one or many to describe it out and and look that there's there's a whole course on that so go and look up the terminology around that what's important is that you learn to draw this because it's important in your planning stage so I love this awesome little tool called draw IO or diagrams dotnet which is a completely free drawing tool it's great for drawing out entity relationship diagrams I wholeheartedly recommend it very rarely do I create anything in the seed yes any solution in the seed yes without making one of these to help me visualize and others to visualize the data model because there isn't one of these at the box in the common data service it doesn't have an intensive relationship diagram you can use some tools from something called the xrm toolbox which I'll link to in the notes but even so you have to draw it out you have to move all the things around the screen to make it or work yeah it's great but if you haven't built the entities yet and you're not the stage of doing you need to plan and this is where I go to do it so it's all great so what we're going to do is let's look at the the concept of a reader right and I kind of want to do some relationships so I want to take that one too many I'm just going to kind of flick the the the the the the changes on this is how you use at all right now I've reading after little bit so I've got what a library a reader can be in well you know theoretically actually in this example they're in one library you can only have one light it doesn't really seem enough like actually we probably want few more libraries before probably actually want that to be many too many so many readers in many libraries right because you could be a member of more than one library and this is this is why it's good to plan this out because you can kind of visualize it and I'm going to link the the book to the reader right and there are many books to many readers right because I could read more than one book and that would be the right way of doing it now just to simplify things down a little bit in our app and and for the purpose is purely of the video I'm gonna have one library to many readers and I'm gonna have many books to many readers and I'm gonna I've got this set up already I've got this author genre language library set up already now in the real world this isn't actually gonna work right because I may have many books that I have read right like a list of books I have read but it's still not it's not actually granular enough what I really need is something that we would refer to is an intersect entity which is why I was saying look you know there's a reading reading record record here and that reading record is going to be there to to kind of say well I took the book out of the library on this state and I returned it on this state because I'm I'm I might want to take that book out multiple times and you're gonna you may want that chronology so to draw that intersect entity it would look something like this so you could say like you know there's many many one book too many reading records and there's one reader too many reading records and this intersect entity is a way of having that many too many join between book and reader without and being there so this is why it's so important to to think about how this structure works right so we're going to go and build an app now we're going to cat one-to-many many-to-one and many-to-many and how they work in parrots and how you set them up in the common data service as well so I'm in the common data service now I mean make parrots calm I've navigated to a solution because you should always build everything in a solution never build without one and I've got a library solution inside my library I've got entities like a book category for a book I've got a book review a book type a library and an order if I wanted to order some more books a reader and a reading record and an app called reading record so don't get those two confused but I won't I haven't got that that author or the language thing yet so let's just look at that and how I would create that so let's go and create language this is pretty cool now because it kind of provisions it in the background so we're gonna call it language if I had and what I always do I put a little space at the ends of display name and you get a little spellcheck there just because you know if you spell that wrong you're actually giving it this logical name at the same time which is the name of the entity in the back end and and that's you know you can't change those so make sure you spin it right I think there's the tip from a dyslexic make sure you spell the spell check this stuff so I'm on it with space at the end there make sure I delete that cuz you don't want like that trailing space to become a problem later on because it can be and I've got my plural name now my display name must always be singular never never plural that's the job of the plural and display name so never call this like languages it's always language and the plural name takes care of itself right my display name here I'm not going to call that language I'm just gonna call it the name of the language you'll see why in a minute right and I'm just gonna hit OK and I should really give it a description as well so in here i should say the the written allowing wedge of the book right of a book and that's going to start provisioning in the background and I can start adding things now to my to my entity so we're probably going to want something like the azure language code code just in case you want to do some also translation so we could kind of stick that in there but we're really digressing but I can start adding those relationships so the first relationship I'm going to add is a one language too many books right so I'm going to scroll down I'm gonna pick my book entity there and it's gonna say it's gonna just jump out that it's a bit pick up there right okay so this is what it's going to be called on the book entity so now I'm creating a field from the language entity on the book entity if this blows your mind we'll do it the other way around in a minute and we'll go to the book entity and and relate back to author so it's gonna be fine the lookup field display name is going to be language but what we should do is just the the lookup field name which is the logical name because everything in the common data service has a logical name and a display name and if you don't know that we'll make a video on it soon we should suffix that with ID right because that's going to help us I don't know that this is a lookup field like it's going to be a related field so I'm gonna in on in code land I'm just gonna see a good there and I really want to know that that's not something else it's it's related to another record I can I can go and do a whole bunch of stuff here so I've got this relationship name now a lot of the time I change this I'll say that that is language and I'll go like one N underscore book because it's it's better from the a descriptive perspective if I have a encounter that I know exactly what it is we could have a relationship a description here which we should have which will be the denotes denotes the language of a book right and then some Advanced Options right now let's let's get into this now because this is where the and I believe this is correct me if I'm wrong guys like still learning the database cardinality comes in so this is where like referential integrity takes over and this is the the type of behavior between the parent and the book right now like at the moment this is set to referential and remove the link but I can kind of do like parental where and it just displays so any action taken on the parent record is also taken on the child record or entities which means if I delete the parent record then the child record will also delete now just think about that if I removed French from my database and I accidentally and inadvertently deleted all of the French books that would probably cause a problem so you want to make sure that you're paying attention it defaults to two to referential right and it tells you here like remove a link you know and it restricted delete so that's a really good one there you know you might want to restrict the deletion of it and then this is custom behavior thing which is really cool and this is where it gets super in-depth so now I can kind of say look you know I want to do I want to cascade all no actually I don't I kind of want to remove the link or I can restrict it so it doesn't this is so much stuff there right and there's there's a whole books on it and and and you know there's a lot of help out there in a Microsoft Doc so if you want to drill into each one of those go for it and but for today we're going to look at actually building them in campus apps and we can come back to this the time so I've now just created that relationship right and what that looks like on this entity is a bit weird so when I look now changing from relationships to fields I don't actually see anything different on the fields of this entity right that it's display to me here now in even if I go in like all fields I can't see anything the same books which was what I'd expect to see however in parents through the connector I'll be able to see on languages I'll be able to see books within the languages right we'll look at that in a minute but if I come to relationships I can see that I indeed do have a language to relate it to a book right now let's go and create author so I can come back here you're gonna click a new entity again and I'm gonna say author and that's authors there we go right just what we'll do for simplicity we'll just leave the full name right and so we'll create that now that's created we're gonna come out of author because we don't want to do a one-to-many we want to do it from the book side of things so let's go into the book entity so we're going to create the relationship now so I'm gonna go from book we're going to say many to one many books to one author right now this again it could be many to many because you could have two right authors write in a book and all that kind of stuff but in this specific demo there's only one author for each book and this is where the planning comes in again ladies and gentlemen this is where that planning comes in and every single time it just you can't get away from it right so let's find author there we go so on this entity now you see this is swapped around I've got my lookup field on this gonna be created on book rather than me creating it from author on book I'm creating it now on book and relating it to author alright like we did before with language where we created it on language yeah I'm I'm hoping that's clear because it gets a little bit hazy and we should change that that lookup field name put ID on the end of it we should do a thing with our book so we'll say mn1 and created from this sound and you know them's the breaks to author actually kind of standardized that yeah I wonder what everyone else in dynamics does that I'd love to hear put it in the comments if you've if you've got like a methodology for naming this thing I'd love to know what it is and I'd say like the author or type of the book right okay awesome and we leave all that alone again we just won't mess with that so I've already created a many-to-many between book and reader in this particular entity but I want to show you how to do it so I'm gonna go many-to-many and we'll do it with a count this time because account it's kinda like what you'd have if you were a family who had a library card let's say I know my local library hat we have one family account for for everybody and we have many contacts inside that so again planning the data so we got it's a completely different affair this know kind of referential integrity backwards and forwards no way deleting and there is this like you see it says relent well it's hard relationship entity name here this relationship entity name invisibly behind the scenes and the common data service they're creating a join table so when you do a many-to-many relationship in sequel you actually create a table that sits in the to with a primary key in that you know to two foreign keys that sort of like linked together and this is doing that for you and we don't get to see that table right and this is where many too many gets a little bit come ok it is a bit of a doesn't mess with the mind a little bit but it's ok we kind of we're going to cope it's also one of the reasons why people like that intersect entity that I showed you earlier on on the diagram they prefer that because they can reach out to see it touch it feel it and we don't like arbitrary things us humans we like to be able to touch it feel it and understand that it's there and give it a little stroke so we kind of got some data entities linked up we've got some relationships linked up now let's get into power apps and try and put something together you so let's keep this super simple on the screen in front of me I've got a gallery that contains the books entity right I'm just kind of sorting it by when it was created so that's it on this side on the other opposite side of the screen I've got a form and that form is linked to the selected item in that gallery and I've got the the put some fields in there one of the fields I've put in is the author and I put some authors in haven't got anything in languages yet so I'm going to go make some languages in a minute and but we've got some authors and this is as easy as it is so once there is that relationship and that understanding between the two all I literally have to judge you'll delete this to show you let's go fields add author bang it's in move up to where it was before and I can just kind of drop down and I can select from the related entities simple as that no filtering no looking up no nothing power apps is doing it natively through CDs and that's the power right like yes it's premium but by god is it worth it so this one this particular book is by that guys one of my wife's books and I don't have anything in languages yet known as this there's like many ways to create data and you create data at the same way there's a really handy dandy way of doing it in in the common data service though so if you go into your going to my library again and I got my languages there and what dear Adam holding down all my languages there and I'm going to just kind of go i've got like the base form which would just be the name of the language so i'm not going to change it and i can just go into daytona could just say add new record and it's going to use the the main form for the entity it's allow me to create stats actually english and we save that one and go new and I know I need French there we go say that some there one thing to note as well which is really cool once you've saved it on the end of the URL at the top is the gooood for the record which can come in right handy if you're mucking around in flow so I'm now in perhaps on that and I can just refresh my book entity here so go and refresh that bad boy it's going to refresh our form but that's no bad thing right so I'm there and then I've got my languages I know that books in French I'm just gonna go submit right that diseases is when you create out there automatically cascades down everywhere it's awesome right so let's break it down a little bit let's kind of like look a bit deeper into what's going on under the hood and and look at some of these things where I talked about being able to walk across stuff so let's see right I've got um I've got a book here I've got a Hitchhiker's Guide to the galaxy right by Douglas Adams and I want to I want to see many of those books right so I'm just going to navigate to another page and I kind of built this little things add a book so I'm just gonna say like Douglas Adams that's how you spell it maybe not Doug Onis I go go and search google books and bring some books back so I'll say life the universe and everything and the salmon of doubt and we'll have that one as well right so we've got now got a bunch of books in our library by Douglas Adams right and what I what I need to kind of do is to go and relate those to Douglas Adams so I can just go and do that so quickly made a bunch of relationships right I'm just gonna grab my gallery here of books right and I'm going to plot that on a new screen and on that screen I've got a gallery of authors okay so we're just gonna plot that over there and what I want to do is show you what hey you know traditionally to do this in in SharePoint in sequel this is what you've got to do and its importance we're going to learn something here as well right so filter books where the author and we need to get to this is the author record on the book and we actually need that magic gooood that's created on every CD s entity if you want to know about more about that I'll be making a video on that shortly so author bit weird but that's the magical gooood ID the the the primary ID of the record right and we're going to make that equal to the gallery of authors which is the gallery on the left hand side of the screen dot selected dot author right and close that off and boom my first author there selected is Sarah quickly in there excellent book and then if I click Douglas Adams and it filters it filters it filters if I go and kill my daughter Oh Jules Verne and there we go and I'm just going to refresh my data source don't think I refreshed it I probably haven't refreshed authors either when you're working in power-ups you really need to make sure that when you're making amendments the day you do a refresh it's not like that on the end-users app but it is on that the makers app so boom like you know because we refreshed it now we can see it so I've got all that kind of awesomeness in there and got my my jules verne got my Sarah Crick you know I got all the books I put in there for Douglas had them so I can swap between you two as you would with any data source it's just this weird also daughter thing but that's not better I promised you better and it's not better okay so let's make it better right so how about we look at this entity over here this this entity which is the author's entity and we use the magic seed yes to traverse it right so let's flip this around let's get rid of filter completely let's get rid of that and we're going to say look I want the the selected record two selected authors books okay so and gallery of authors dot selected dot books okay bang and it's gonna work in exactly the same function no like mad whatever know kind of like filtering and blah blah blah blah blah I Bank got it straight away right super powerful super cool what is also great is that you'll notice on this particular thing here I've got a little problem there whether it's creating on that actually needs to be title so I haven't got the author's name so let's get the author's name in there right someone just plop that in there and we'll just say like make that 14 or something author's name right so how am I going to get that so I can go this item author dot name and you see there I've walked up a level so I've gone from the book and now I've gone to the parent of the but the the parent object with inside the relationship so if you think about parent and child many being the children one being the parent I'm now from there going from the many to the one right and you could see there I had everything exposed right so I've got like the the name they said the one thing I can't do is go author book so I can't go can't go like into the author and then down again I can't go up and then back down again it doesn't allow us to do that so if I wanted to kind of like click and see all of the books that the current like from this record I'd have to do that the traditional way but it's still brilliant you know what I could do is is do this in a number of ways so let's just leave they leave that as name right so I've got what I could do is I could display all of these in this gallery underneath the underneath the little illusion move flip there right so I could kind of go if I want into this item dot books right because it's got that that reference there and I could go like you know put popper and an image in that little gallery that's underneath there so let's go for a with media image so there we go and I can go like this I am Darth um no I think I've got yet thumbnail and shade all Gotham get it or maybe I've not got thumbnail populated cover there you go there's cover lot thumbnail and there you go like that's the that's the power of it that's why it's so cool because I can go up and I can go down and it's is brilliant like that imagine doing that with SharePoint and look no delegation warning right there's no can you see any like little yellow exclamation mark was there any blue squiggly writing anywhere you cannot do that in SharePoint now what's brilliant in the background here explicit column selection and the intelligence that the common data service connector works on is looking at the app I'm building and understanding what data I need to use and it's only returning that data so it knows that I want these things so it goes and gets these things and it leaves everything else behind and it's super super quick you know like it's connecting directly to the database it doesn't work like the other connectors in Power Platform that's why it's so damn quick right so that's super cool now let's look at how to use that with a patch function and how one would go about creating these these relationships with code and and moving them around right because there's one there's one elephant in the room we have an address yet which is many-to-many which is a bit weird so we'll look at that in just a second so before we look at many-to-many and let's look at patch because the easiest way to do many-to-many is through some formulas so let's let's get into patch in relationships first right so I've got I've got two things here I've got a book at the top and I've got a reader at the bottom and I've got a nice being number that I would paste into this box and a reader ID where I pasted into this box right and I could scan the barcode on the back of the book and I could scan the barcode on the users on the user's library card and once those two things are full this button would enabled it so you can see it and let's have a little look at what's inside of it right so we've got a little concurrent statement going on here saying you know if it's if there is a relationship unrelated and this is exactly what we do for the many to many relationships right so but in I've got a reading record here so I'm like I want to relate the book to the person and that's what's happening at the top and we will look at that in a minute we look at that many to many in a minute right but let's look at the patch that creates a reading record so this is where I was talking earlier on about an intersect entity so that reading record would be a record that says hey Steve took the book out of the library on this day but he might take that book out many times so each one of those would be a record of Steve taking the same book out but we might want one relationship that guards the top of that that says yeah we know Steve's definitely read this book but just not how many times but we know he's read it so like two two variants of the same thing and you might want that for your analytics so let's have a look at that patch statement the patch statements very simple what we do is we pass in the record right there's nothing more complicated than that we don't even have to go to the expense of doing a lookup or this that any other it's just simply the records in the system you give it the whole record you don't give it a good you don't give it any the name you give it the whole record the whole thing and that can come from anything it can come from a collection it can come from a gallery it can come from a variable it's just looking for the shape of that record with that gooood inside it and perhaps automagically knows what to do with that relationship how cool is that I mean that is just like that's cool right and it works like it just works so well so when you are when you creating this so that the reader is this thing at the bottom here and the book is that is this gallery at the top right so there that's the check out books gallery and this is the check out readers gallery and all I'm doing is saying that the reader is to checkout reader I've selected all that switch scanned in and the book is the the one that has been scanned or the one that we've put in the I spend in number for that is it so nothing more complex right you placed you put the whole record in the whole record out you know you know shake it all about you that's another story and so let's have a look at this is a little bit at the top here and it's and it were kind of you know opening the curtain to what you will do when it comes to model and many to many relationships here and that's using this awesome relate function right so this special piece of code at the top here is saying if this is not in this one's table why does that mean right so when you are looking at many to many in the middle of it all is this invisible entity remember said there's an invisible entity in the middle so we've got to look and get to that invisible entity right and to do that we say gallery check out selected reader so singular yeah the singular reader in and this is where it gets confusing this is most confusing bit in gallery books selected readers yeah selected readers that's the book entity like the book this is the book entity we're talking to you now so this is the readers on this side and the books on this side and I'm saying in the books list of readers is this one in it and to get to it I have to do readers dot reader yeah cuz I want that GUI don't want that that unique super unique number so I'm saying is the super unique number for the reader inside of the list of books then so eight the books list of readers super unique number and if it isn't in this particular case because it is not then I want to create that relationship and to create that relationship I use the real function right it's as simple as that and great acclaimed Austin this team has done an awesome job of keeping things simple naming things that make sense it's the relate function right ten points to Gryffindor for anyone who knows what it is to break a relationship that would be the unrelated functions we'll look at those in a minute um so let's sound look at the relate function the relate function is probably similar right so I want to look at the gallery for the checkout of books right so the books entity and I want to say this for the selected books list of readers put this reader in that book in in that list of readers for the book yeah confused yeah I thought you might be but just think about it again right it's the list of readers for a book and now I'm adding the readers to that list and it works the same the other way around because it's many-to-many so if I have found the reader and I want to say the read the books that this reader has read put a book into that list now you might be thinking all this is really cool I could do some really cool stuff of this and you can write but by the same rationale you can and I'm going to show you the one thing that perhaps can't do with many to many relationships and it's um it's currently yeah it just currently doesn't work and it goes completely bonkers but and it you know it's completely unusable but it's good to show just for learning purposes right so you're not going to do this in any kind of production app right so I've got a reading manager here yeah and I've got my people who are readers and I have my list of books okay and I've got this little toggle II totally toggle anything up here and I can select a reader so let's select and Brad right there's Brad got everyone wish you say look like Brad don't they and I've got a checkbox on the book and let's have a little look at that check so we've got Bradley selected I've got my checkbook so let's have a look at the three what three most important things on any checkbox right the default that sets whether the checkbox is checked or not the uncheck event handler and the check event handler right so in our default we've got what we saw before we've got and this is and the reading managers gallery this time so reading managers readers so that's this one over here right reading managers readers yeah reading managers readers this is in the default selected reader so the selected reader white and it's that that this is that gooood you see there you can see the big gobbledygook good is in this item this book Dirk gently's list of readers right is he is he in that yes or no he's not okay so what else do I have in these galleries in each of these galleries I have a gallery in the gallery so I've got my list of books and I've got my list of readers and inside my list of readers Mike my gallery of readers I have a sorry that was a dog I have a secondary gallery an embedded gallery of books right so I'm gonna try and show all of the books that this person's read as I update them it's not going to work but it will with our refresh things a few Thomas water refresh buttons on silver screen and then in the books gallery I have an inserted list of books right so I'm going to try and display sorry insert list of read it's got I'm confused and I'm gonna try and display the readers that have read that book right so let's let's go for it so I've got Brad selective and I'm going to say that Brad is red Dirk Gently and life the universe and everything okay now nothing appears straight away right so I think we're going to preview mode use to be on the safe side and I'm going to hit refresh because you have to refresh for many two menus to take a cab and now it's turned up on one side but it's not shown on the and this is where many too many's don't aren't happy so it's happier doing the relationship on the other side displaying that first then it's going to display the ones on the book side so it's happy to do the the readers side because we've told it to do the readers side in the formula and that's kind of updated but we haven't it doesn't know to automatically update itself backwards right confusing yeah I know it really is and this is why you don't do it this way but the formulas are the same right so again look into formulas in a minute and now if I hit refresh again we've kind of waited enough time for that to populate and now I've got Brad here and Brad there but look the tick box has gone away so now let's refresh again and a tick boxes back so it's just a weird janky perhaps thing were you to do this with one record in a drop-down box what when one records selected the only record selected on the screen and a number of drop-down boxes you would be fine it's just because I'm doing this in two galleries and I'm trying to do it both ways and the only reason I'm trying to do it both ways is I can demonstrate to you what it looks like right so this and if this let's add another book at the universe and everything and let's see again it's like it's really slow and I've got to do that refresh all three times for it to happen let's have a look down the bottom Cindy down there right so we'll give the salmon of doubt and life the universe and everything and Dirk Gently right and it'll go over that side first then it will sort of come on this side and we may or may not get what's in these red you've got to go really slowly at this thing to get it to kind of take and even then it's like 8,000 doesn't do it sometimes so oh we got Cindy selected now there we go life the universe and everything for Cindy right there you know so you can see there are now many too many books related across so let's have a look at those formulas like obviously we're not doing it this way we're just doing this to look at the formulas so as an experiment so let's look at the on check right the on check has got that relate thing that we had earlier on and this time we don't even need to go crazy we're just going to throw in this item yeah that's it this item we could go even deeper we could go one deeper and go for the group we'll take this and this is this is why it's so low code no code right so that's what we saying relate the selected reading manages books to this book job done and then back the other way for uncheck what's a good like it's just gonna say unrelated exactly the same how cool is that a case exactly the same now if we break this down on the omni on that other on the other app when i do that when i create the relationship it's seamless because we're doing one-to-one the code isn't getting confused with itself because it's not embedded inside of itself and doing all sorts of craziness but this screen is just doing that because i'm purposefully doing the crazy bit and that's pretty much it we can look at the gallery and the gallery for the readers is this item books boom easy peasy and again like the the inside the the gallery of books I just got this art and got readers populating the gallery and for that for the readers it is simple um but like I said if I just had one drop down to go through each reader individually it would be so much so much simpler but when I change readers now you can kind of see this update and I've done this in in production with many to many and it works beautifully but you just need that one thing selected and you're good but if you try and do many then it just like if you're trying to have many on one side menu on the other side it just goes nuts anyway that's that's pretty much it and one thing to say to break a relationship you can move the Unruh like you can use yun relate function but if you were patching you can use blank right so let's say for example it's just got one level to the book checkout and if I wanted if I was a blank King if I had a button that said delete and unrelated these two things and I didn't want to use the relate function I could just throw blank in there and it would it would nullify that that relationship so just remember for many to many that that book thing we're going to say the list of readers that this book has is this reader in it that's where the in thing comes in and then to do the make it a relationship its relate and two unrelated ocean ship its unrelated yeah there's a ton of documentation on relate and unrelated by Greg Lynn horse and he's absolutely awesome and he explains it in really easy fashion on the power platform website link below I really hope you enjoyed this figure I've been wanting to make it for absolutely ages but I just haven't had the chance and I'm really grateful that you've watched it if you do like my videos please do subscribe follow me on Twitter and ask questions on Twitter as well like there's a whole community there ready to help you for power apps and and the power addicts would just like rally around you and help you with whatever you need so yet super awesome have a great time speak soon
Info
Channel: PowerAppster
Views: 5,412
Rating: 4.848485 out of 5
Keywords: CDS, Common Data Service, PowerApps, Power Apps, Power Platform, Canvas Apps, Microsoft, PowerAddicts
Id: N5QSxZFoxfw
Channel Id: undefined
Length: 49min 9sec (2949 seconds)
Published: Fri May 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.