How to Design and Build a Data Model in Microsoft Dataverse

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I've had a lot of feedback on my big tutorial here on how to build model driven power apps from people who are interested in understanding the thought process behind building that data model now if this is an area that you're interested in working in then being able to come up with that is actually the biggest skill than the drag and drop to be honest the drag and drop part all sort of falls into place once you've got that if you're looking to be certified in any of the Power Platform exams understanding how to take business requirements and create that kind of data model in Microsoft database is definitely one of the skills that you need so this video is something that can help you with that so the starting point here is that we are building an asset management app and typically what do you do when a business comes to something like this we will end up with this kind of situation Excel is still the most widely used business application in the world and it's a go-to for many people oh I need to build a way to track my assets I don't have any system available available to me so I'm just going to do this so this is a perfectly fine starting point if you've got a small business handful of assets but what happens when you need something that gets more complicated than that so Excel perfectly good data source for your Basics SharePoint lists also good data source for certain use cases but the things I want you to consider before we get into building this data model is why we would even do it using Microsoft dataverse in the first place and the core things here to think about firstly is the size of your data how many rows are you likely to have if you're working in an Excel spreadsheet and you're managing five ten thousand rows of data you're probably going to be all right if you're talking about Millions hundreds of thousands that just isn't going to work the second thing is around the security of your data do you need it to be somewhere absolutely secure what happens if that spreadsheet gets deleted what happens if people are saving as and putting it somewhere else because they are after copying and pasting from that do you need different levels of access for different things should everyone who gets allocated something be able to see that should they able be able to see what other people have got and so on so these are things that you can't easily achieve with spreadsheets and SharePoint lists that start to lead towards saying you might need a database application so we've got the size we've got the security what about complexity again if you've just got one or two tables in there here's the table of my assets here's the table of my people here's some dates and so on you're good again what we see though is people going so far into stretching the limits torturing Excel SharePoint lists and so on with multiple tables and trying to connect them up and do all of those things if you've got complex data if you want more than what if you start wanting to manage different suppliers for your assets and the relationships with those suppliers and where you're purchasing them from those kinds of things what if you want to be able to manage and enter to end process so this is the fourth thing now size security complexity and also process do you have an end-to-end process that you need to manage is there something going on behind the scenes here that isn't as simple as Lisa has that iPhone but more like well actually Lisa's manager needs to submit a request for her to have that phone and it needs to go through an approval process and then when it comes back in we need to do a check to make sure that the quality of it has been returned in the right way so all of these things is where dataverse can be a good choice I'm not saying it's the only thing you should use for everything but these types of things if you have a lot of data you need security it's complex you need it to be scalable and you need to do some kind of end-to-end business process this is an option you should consider so what I'm going to do here is talk you through building out that data model and the other thing I really want to do in this video which is different from what else I've got on my channel here is to separate out the experience of the model driven app from the dataverse piece because I think there's some confusion around that when you build something in powerapps the first question regardless of what type of Power app you're working with you need to understand is where am I storing my data now if you store it in dataverse you can still build canvas apps on that and I will show you that you can also build model driven apps but people sort of come at this sometimes and you know if you've watched any of my content we tend to come from that entry point of the model driven app I'm flipping that around this time to say let's talk about the database and the data model and where you are storing your business data and how you do those requirements and then let's consider what kind of app experiences that we want to put on top of that because it's not the same thing these are two different decision paths that you can make all right without further Ado let's get into this and have a look at building out this data model so I'm here in my make.powerapps.com experience regardless of whether you even want an app on top of it this is the portal you're using for building out something inside database so the first thing I'm going to do here is go into my Solutions area we always create a solution regardless of what you're doing here even if you're just building out these data tables so you've got this together in a way that you can grow it you can move it around between in environments between testing environments development environments production environments and so on that's a whole other topic for another day for now what we're going to do is just create this Asset Management solution you can select a publisher here what I would normally do here is start by creating one that's in my name or if you're working in a business you would usually create this with your company's name or however you want to do this I'm just going to put my initials as a prefix in there and click save and and then we are good we've got the new publisher that takes a second we'll pop that in choose me as the publisher and go so all I've done so far create that solution bucket and create me as a publisher which is like my digital signature on it that's a one-off and we're good to go so the first thing I'm going to do here if I'm working on my asset management app I've got a little PowerPoint here to sort of give you a bit of an idea of the of the thought process so let's just switch across to that is that I need to create a table which is an asset so first thing here is what do I in what information do I need to collect so if you're working in a consulting or within your business to do this and you're trying to solve for this problem the first thing is what kinds of information am I collecting here so we've got assets in the business that we need to allocate out to stuff so this is going to be a core piece to start with so I've got my asset I've got perhaps the name of it the type the price the description when we acquired it maybe a serial number all of those kinds of things so this is a thought process that you need to go through first and in fact it's not unlike what you would be doing when you're creating this Excel spreadsheet so this first part is relatively easy you know you're setting up a table with columns in a table exactly the same concept in the first instance it gets a bit more complex as we go with creating relationships but that table concept you can think like Excel so what we do here is we say I'm going to create a new table we give it a name which is asset you'll see it comes up with the plural name now within dataverse you can do a lot more off the bat here than just what you can do in a spreadsheet because you've got a bunch of other things I'm not going to do these things but just to talk you through some of them we can enable attachments in here if you wanted to save notes and files so maybe we would want to do that maybe I'd want to have a warranty card or something against the against the asset and you'll see here that we've got some other options here so we can have an image associated with it I go through some of this in my other big tutorial do I want to be able to track changes against things do I want custom help down the side do I want auditing so this is another thing you can do here is to keep track of everything that's changing connected SharePoint document management so there's a lot of different things here within the table that go deeper than just the table itself for now I'm just going to click save and create that table and Watch What Happens here because the core structure of what goes on when you create a table in dataverse has a lot going on underneath it so I've got my experience here where we're going to start building this out and the columns are like those columns in the spreadsheet here so if we go in here now I didn't create you can just let me create any of that did you I just went new table there it is and look what's happened so for those of you who come from a database experience like SQL or access or something this will is something that's important to understand how this works I don't actually have to manually create a primary key or I don't have to create anything around the security and the auditing Modified by created by owned by all of that is what's done here if you're coming from an Excel type world you're getting a lot more than you did already just by creating a tab in your spreadsheet here so we have got the unique identifier which is created for us that just sits underneath I don't need to do anything with that and I didn't have to actually create it we've also got a primary name column here so this is something that if it was a person it would be the the name of the person this is sort of the the main the header if you like of the of the record we've also got a bunch of other stuff in here so we have like when it was created by created on Modified by modified on who's owning it some structure in there that allows you to have team or business units and structures in the organization you can have a status in here as well records can be active or inactive which is sort of a soft way of deleting records in the database so there's a lot going on there you don't need to know all this when you're getting started but just be aware of the richness of what is being created here that it is more than just simply a table all of that stuff I was talking about at the start if you want to be having business logic and so on is enabled by doing these things here so let's go ahead and create our actual table here so I can create additional columns so the first thing I'm going to do here is add in a column for let's say that we wanted to put in the serial number now as we go through this dataverse allows you to structure your data so when you're creating those columns in Excel or in SharePoint list you choose what data type it is so this gives you a rich set of things you can choose so my serial number is actually just going to be a string of text it's not behaving as a number it's actually just a line of text in there so you can choose different things we've got numbers choices currencies and so on I'm going to go through many of these in this video as we work together here but for now this one is nice simple single line of text and I click save what else might we want to do and this is where again you need to think about applying your real world scenario what types of things have I got in here I want a description as well so let's go ahead and put that in and this one instead of being a single line of text I can actually have different things so I might want Rich Text here I might want to allow for other things there's always additional options in here so we can have our maximum characters let's sort of go for you know 4000 or something in there so we've got a bit of room to put some richer data in there what else let me check my notes here we've got a serial number the acquisition date when did we actually get this asset so as we're entering things into the system so we can have the acquisition date that one is going to be a date and time and we want that to be a date only and we'll save that we could have the purchase value or the price of the thing value and that one is going to be currency which allows you to do certain kinds of currency calculations if you're working across multiple currencies that does some sophisticated things if you're not it behaves with a dollar sign in there and let's say we've also got a type in here so we've got the asset type and this one is going to be a choice we want people to choose and actually drop down something so we'll choose choice in here and you can actually set up choices so that they're used across the entire database I'm going to just choose no here and just sort of create this simply again I don't want to go into too much detail of this stuff I've got all that in my other tutorial so we will make this one what have we got say a phone and we also want to have a laptop for instance and we can put the different choices in there and save that all right so now we've got our asset table ready to go and so what I want to do now is help you understand the difference between the data model and the place that we're storing the data and the app experiences over the top of it as I said usually in my content we're going straight into model driven apps I've also had some people sort of ask questions about why I do it the way I do with creating all of this stuff and then doing the model driven app at the end I just want to give you a bit of a sense of where we can go with this and then we'll come back to developing the rest of the data model so I'm going to go back here out of my cable creation experience and into this main create menu and I want to create an app with database because when I'm creating a canvas app the first thing that happens is which data source do I want to connect to it's a blank canvas I'm going to connect it to data and that doesn't have to be SharePoint you've got an option here to use the richness of all of everything that's going on with canvas apps but if you need a data source that is secure and scalable and complex and has underlying business logic and all of these things then that can be the starting point so let me show you how this works so we can say let's create a new connection here I'm going to connect to my a soft database now you'll notice this is a premium connection so in all of this obviously because the licensing question always comes up you do actually need a premium license to be able to do all of these things because you are working with a premium Enterprise data source here not a productivity data source all right so we're going to go through here I'm going to choose my assets table and click connect and we have the Magic World of the instant canvas up here of the three screen app now remember I didn't put any data in all I did was create my database table and put the and just leave it as is so this is not going to be the world's most incredible canvas app but hopefully you'll get the point so we've got our regular sort of three screens here I've got a browse screen a detail screen and an edit screen let's have a look at the gallery here so we've got a title subtitle and body I want to have a look at which Fields it's picked here exchange rate created on a name yeah not so good name for title one is fine let's have one as the let's make this the type and then this one can be the purchase value all right that should make a bit more sense let's go ahead and save that we'll call this one the assets app now this isn't going to be this is something that you could sort of have that experience viewing the assets on their own but obviously as you go through this process you would be designing out the app experience you want on that underlying data model here so I'm going to go and add a new one so I didn't edit that form did I I was badly done let's close that and go back into my edit screen here let's go into the form let's choose the fields so I really don't need to choose created on we'll remove that but I'm going to add those other things that I wanted so I want my what did I choose before I chose the type and the purchase value all right good let's try again save and play I'm going to put this one in here as my iPhone 14. this one is the type CC that's connected up to what I created before purchase value these things cost about eighteen hundred dollars in my part of the world and we will save that and there we go that's in there so we'll close out of that preview okay I'm not going to worry about publishing this app or anything I'm just going to go sort of straight back into my data model so Point here is that you can start with that dataverse table actually if I go back now into my solution and into my Asset Management solution and there's that table you will see that that has created the underlying data underneath so we'll see some rows of data in here and you'll see that now there's a line of data there we go with the iPhone 14 and it's created a unique it's called a good unique ID underneath to identify that record I can do the same with the model driven app so if you want to see more about model driven apps I've got plenty of things there but again sort of same experience we can just go let's say I want to create a new model driven app and I can bring that table into here so this is my asset management app and so typically if you're building on dataverse you might end up with two different experiences here you might have one here for the people who are working that end-to-end process that we're about to build out and then you might have other people who need a mobile use case or who need the beauty of that canvas app experience for whatever it is that they're doing so let's bring this one in I'm going to bring a dataverse table in it is my asset I should probably just have typed it there's a lot of A's a lot more A's than I would have thought where are we here asset showing navigation add and boom there we go active assets and we've got the iPhone 14 save publish play so in both cases here once you're working on dataverse that experience then of getting started with the model driven app or the canvas app experience over the top of it is nice and simple again we're not going to go too much into the app making because I want to focus on the rest of the data model so back to my uh very exciting PowerPoint here that I'm going to build these things out on so far we have got an asset all good now I want to be able to know who's got the asset that's the whole point here is the business requirement is who who's been allocated this asset so this is sort of the starting point and there are three different ways of thinking about this if you think about it like excel in sort of a two-dimensional way of thinking then within your Excel spreadsheet you're going to end up with something like this you've got sort of a who's it been allocated to and that would typically look like a drop down so you could create that in dataverse you saw before I created a choice column we could just go out located to and done honestly if you're going to do that you probably might as well stick with Excel you're sort of not getting a whole lot more out of it so let's sort of think in a bit more of a three-dimensional way a bit more of a database way here so the other way that we can do this is with a related table I could say one person can have many assets associated with them so this is the idea of a one-to-many realistically in this business that we're working for Lisa joins the company she's going to get allocated a number of things she's going to get allocated a phone a laptop and a tablet lucky me good all right so we could do that we could create a relationship between people and those assets in the system however this is where this idea of business process starts to come in because what if there is a process associated with that so firstly maybe my manager needs to request this asset for me and maybe somebody needs to approve it and they might need to order something that's not in and there might be other things here that we want to track in particular the process of allocating the assets if you just do this you'll end up with Lisa has this iPhone and then if I leave then that iPhone would be unallocated from me and it would be sitting in the pool that would work but you wouldn't have any process of managing the particular instance of allocating it to me here it is on this date it was returned in this condition and all of that process that goes with that so you can level up a little bit here so what we start to think about now is more relationships and this is starting to think in a three-dimensional database kind of way instead of a two-dimensional Excel type way I've got these different assets I've got a table where I'm recording all the assets and then what I'm going to do is create a table where they can be allocated because the iPhone has an allocation that starts in January it has a status of approved the laptop has an allocation that started in January and the status of approved and here's my person here is going to be associated with those so you can see now what we're doing is putting together a data model that allows you to do different things so the benefit of doing something like this is that when this person leaves the business six months later it didn't work out very well maybe they didn't pass their probation I'm going to stop using myself as an example here now then these things have been returned and then a new person starts and we might say that laptop is now being allocated maybe the phone is retired maybe that's past its best and we're not going to allocate it to someone else but we're going to allocate that out to the other person so you'll see here we end up with something more sophisticated than simply a spreadsheet that says these assets are located to these person and these people and these dates we can do better than that in a database by having this whole process because now what we'll end up with is if we look at this laptop we've got a history of what happened it might be allocated three or four times hopefully you don't have that much turnover but this might happen might be a returned in poor condition and but you've got a trace of all of these things so let's build that out and have a look at what that looks like so because that allocation table sits in the Middle with a relationship to both the asset and to the person what I'm going to do is talk to you about the person table first so that we know what's going on there and I'm deliberately using the word because that's how SharePoint talks about it this gives you some more options in here so what we've got out of the box within dataverse and again I'm going to sort of navigate back up to the the core tables here is that it provides you with a bunch of tables for standard things so one of those is a table for contacts so if you're doing something where you want to record people in any way the contact table is a good one to use so the contact table has already pre-built into it all of these different things and you can actually change the names and edit this and add other bits and so on but we've got things like their address first and last name date of birth and so on this goes on and on and on you don't have to use all these things but look how rich this is like this is really being built out this is built to the extent that you could do a basic customer relationship database of this if that's what you wanted to do so your contact table is available in there if you wanted to use that if you're working with an internal scenario you've actually got a couple of other choices and again there were some questions online a big tutorial video about why I didn't make these choices so we have also got a table in here called user the user table so contacts you can enter anyone in contacts is ideal if you're working with customers or if you just want full control over entering those people into the database the user table is actually connected with licensed users of the of the environment here so anyone who's been added into this environment as a user so if you're doing things where for instance if we want to say it was requested by someone and everyone who had to be everyone requesting was a user of the app that would be a good way to use that table your third option here is one called aad user now you'll see here this isn't showing up because by filters it gives you the recommended tables rather than everything the reason for that is that if I click all here you will see suddenly that there are a lot like there's a lot including a bunch of AI things and I think for most people that's just too confusing so if you don't see the one you're looking for click across to all here incidentally if I click custom I'll just see the asset table that I've created earlier so if I go across to all there is another table here called aad user Azure active directory user that is what's called a virtual table that is a direct connection to all of the Azure active directory users so in this scenario that I'm building out for Asset Management if I was allocating assets to employees and all of my employees were on Azure active directory as they likely would be in a real world scenario that's the table I would use because that's going to sync across all of the information if you're interested in a deeper dive on that let me know in the in the comments here and I'll come back to that what I'm going to do just for this demonstration though is work with the contact table just because I don't have an environment set up for this that has a lot of users and things already in there and it's just a bit of a simpler way to control it for the learning process but to those of you who are who've asked that question in a real world scenario yes I probably would use that Azure active directory table for this scenario so what I'm going to do is say well if I go back to my sort of slide deck scenario here I need my assets I've got my people but they're already in there as contacts that's actually pre-built for me I don't need to do anything there I just need to create this table that sits in the middle now and this table in the middle has got relationships each way one asset can be allocated many times one person can have many allocation processes allocations of assets associated with them so I'm going to go back always build even if you navigate around in the tables here always go back to your solution to do the actual building you want to keep all of those build pieces together if you want to turn this into a proper production app just don't don't start randomly creating things but you'll see here that I've got my model driven app because I built it in here I can also bring in my canvas up because I built that before and I didn't I didn't save it so let's bring that one in and add it in so now I've got all of those things in the the one bucket there so this Asset Management table we're going to talk about relationships now data relationships not personal relationships I am going to create a new table and this one is going to be called asset allocations and again I can choose all those other options in there that we talked about earlier but we're just going to go ahead and do that so what I need is a relationship here which depends how your brain thinks about this again this is questions I get a lot because I tend to do things as a lookup so the idea here is that you can when you're creating this relationship the relationships work as one-to-many or many to one depending on where you're coming from so one asset has many allocations associated with it but we're creating this allocation table so from the point of view of the allocation table it goes the other way many to one now my brain likes to kind of go the other way but let's do it this way same with the contact here is that we can go one contact as many allocations from the point of view of that allocation table many to one I'm going to do this we're going to create two relationships that essentially do the same thing this many to one relationship to each of these tables I'm going to do it two different ways and this this is entirely you will end up with the same result this is really down to how your brain likes to think of it and my brain does it the second way but I'm going to show you the other way first because people do ask me about this so the asset allocations many to one relationship back to that asset table so what I do here is I go new relationship and I want a many-to-one relationship and I want to relate it back to the table called asset now what it's doing there is creating that relationship but you'll see it's also creating what's called a lookup column so the lookup column is the piece that you use to connect those things in the app experience it looks like a little magnifying glass either in your model driven app or in your canvas app so that as you go here we go I'm going to allocate an asset which asset I need to look up so that's created that relationship and also that particular piece that's called the lookup so if I have a look now we've got relationships in here then now don't freak out there's a bunch of relationships this is all to do with that scaffolding that we talked about at the start with the Modified by owner that's linking into that user table because users own records there's a lot going on there but for now the thing I want you to focus on is that we've created that many to one relationship with the asset and also that what we will have in here now if we look at the columns is that lookup column that was created as part of that process let's click on the right spot and see if we can get through to it here so there we go we've got asset and it's a lookup data type you can do it the other way around so you can create it by going relationship if that's how you think about it in a very proper database kind of way I tend to think about it as this way of almost from the front end which is a very typically low code way of thinking about it which is where I come from things this user interface on my allocation form I want a lookup to the person so we do it the other way let's go back into here I want to create a new column and this is going to be allocated to who am I allocating it to don't need capitals there and this data type is a lookup which table am I looking up the contact table or the aid user or whichever table it is that you prefer to use and I'll click save if I create the lookup that also creates the relationship so give that a second I'm doing this one in in real time here so there we go there's my lookup I'm going to go back into the table and a step too far let's go back into the asset allocations table and have a look at relationships and there we go now I've got that many to one relationship so when you're setting up those relationships you can do it either way and you're good now we might want some other things on this table here because now I've got my asset allocation table who and which asset are connected up but I want some other things in here and so this is where we can build out the rest of that so we have uh let's see we have the allocation date and that is going to be a date and time and we want that to be just a date because I don't care about the time that it was allocated we can have a return date so in fact what we did here was we said we wanted a as expected return date and this is the other thing is you can start doing those calculations so this one here I'm going to choose that this is going to be a formula column and this is where Worlds Collide again this uses powerfx which is the same language you use to build a canvas up so if you've got those skills you're good to go here so this is going to be a date formula here so I want to do a date add if you don't really know what you're doing starting to type something and following the logic Works quite well let's open the bracket so I want this one to be the allocation date so I should start typing allocation date there it is allocation date number of units so let's say people get things for two years and another comma and then time unit years close that I'm not going to try and give you a full lesson in Power FX here but you'll see I'm this is not something I do every day I'm kind of figuring it out as I go along I want the format of that to be date only because it's years not days and minutes and save so that's going to do a calculation and that calculation is happening at the underlying database level right so if I build a model driven app on top of it that's going to be grayed out and it will calculate when it's entered same if I build a canvas app on top of it I don't have to build that formula in the canvas app the data source is doing that calculation for me so I've got my expected return date I'm going to put in my actual return date and that one is going to be date and time and date only and save that what else do I want in here we can have things like requested by the approval status and so on but you get the idea so we start to build out all of those things in there as well so so far now if I go back into my Asset Management solution because I have brought in a relationship with contact it also brings that table in so it's got all that stuff underlying I'm not using all of it but I'm using that table and that table is part of my solution so if I go back into my data model here now what I've got is the ability to have my assets I can track multiple allocations per asset and whatever app experience I want and who has got the allocation of those things and the status of them and then I can also start to look at filtered views so my canvas app I created earlier which was assets I could filter that gallery and say show me available assets I can do filtered views in a model driven app or whatever it is I want or power automate flows that say when an asset is allocation is returned to then Mark this as allocated and you can do all sorts of things again I cover a lot of that in my other tutorial and if you're interested in more of that automation stuff again let me know um because I don't know how much is out there on how to do those automations of dataverse I'm going to need to abandon PowerPoint at this point right because I've sort of drawn these lovely diagrams for you but if we're talking about a real world business requirements Gathering scenario you're going to end up with something more like this an ERD this is your diagram showing the actual relationships this notation here is the way that it's typically done so now we have an asset where there are many asset allocations a contact where there are many asset allocations so now this is down to the skill of understanding what else the business requires in order to keep track of this so I'm working with my business user here what else do you need so we've got a list of all of our assets we know who they're allocated to we've got a way of tracking that process and the person says actually I also need to know which suppliers the assets are coming from we've got a bunch of different suppliers and I need to be able to to know for this iPhone which supplier did that come from so now we start to build this out a little bit more we would have another data table in here called supplier and that would link to a lookup again on that asset table this asset came from which supplier and again one supplier is supplying many assets so let's do that relationship that way around in here supplier would be a business an organization of some kind and guess what dataverse already has a table for that I don't need to go creating it so what I'm going to do is come in here and say I'm going to add an existing table I'm going to use the account table and click next and I'm not going to bring any of the other assets in I'm just going to bring the fact of the table and just to sort of show you what's possible here is that if I click on this I can change the name of it because I actually want to call this supplier so if I go into this properties button here you'll see this edit come up and I don't want to call it account I want to call it supplier and you can change the description and so on as well so these are the Box tables understand them use them uh there's a lot going on in there but in particular account contact and that also has a relationship there where one Supply already has if I look at the let's have a look at the relationships that already exist in here one supplier already has many contacts I didn't bring those into the solution but trust me that's in there so I want a new relationship here now I'm going to do it the other way around one to many which I'm much more comfortable with one supplier can be supplying many assets so let's connect that up new relationship one too many supplier two assets and again it's created that lookup name now see how the lookup name defaults to the name of the table I actually want to change that so we can call it something different it it figures out the just the display name for me based on what I've changed it but I want to change the underlying name there as well and we're good so now I've got a data model that looks like this what else does the business need so I can track who's supplying my assets what the assets are who they've been allocated what the contact is I also need to do quality check on what's going on now if you've watched my main tutorial here this is the part people get a bit confused about why we're doing this let you know a little secret here most of the reason that I've got this one in there was to show off some other data types I put Rich text and a rating with a star component and stuff in there I was more just trying to flesh out the data model a little bit more and try to give you the biggest breadth of different data types in there this one you could do in a couple of different ways you might this allows you to do sort of a quality check is the is the asset a good you know is it is it in good is it in good Nick has someone looked after it well you could the way that I've done this is associated with the asset allocation because what I'm doing here is saying I want it to be done more than once as part of that process so I'm thinking about it as related to the process and this is where this database modeling and Design This is where a lot of the work is you do need to spend a lot of time figuring all this out I did say at the start the drag and drop is easy this part is where the real understanding of the business requirements are coming in so if the requirement here was that they want to be able to say I want to do a check as part of the allocation process and to check again at the end of the allocation process you might do it like I've done here as a one asset check going into the uh sorry the other way around but you've got many asset checks happening as part of that allocation process I've drawn my my little clawfoot diagram the wrong way around there so if you wanted to do it as part of the asset though you might just do it as a one-off that you want to just check the condition of the asset when it's returned and just have it sitting there so there's not a single right or wrong here but you've got another table with another relationship I'm going to show you how I did it the same way I did in that tutorial just for consistency so back into my tables here and I am going to create another new table here which is called asset check and save that and I'm going to do it the way that makes more sense to me which is again with this lookup so you've seen it a couple of different ways we're going to say this is going to be a new column here which is a asset allocation and that is going to be a lookup to the asset allocation tell me which way you prefer to do this by the way I suspect the choice of doing this via a lookup versus via relationship really depends on your background if you like me coming from sort of business user background into this you're probably more likely to do it the way I do if you if you're a database developer you're probably going well listen why are you doing it that way it doesn't matter you get you end up we looked at it before you get the same you get the same result so then the asset check here has different things in here I'm just going to keep it nice and simple and we've got our description which is going to be text and we will make that one oops we'll make that one rich text because we want to have a lot of comments in there and then I'm also going to put in a star rating so this is just to sort of show you something different here so this is going to be the rating and that's a number we haven't done anything yet with a number so that's a number a whole number you'll see there's lots of different numbers in there and you want to go in here when you're doing something like a rating one to five because you do not want to allow a rating of minimum value to what is that 2 billion or something so we want this to be maybe we want the minimum value to be one and the maximum value to be 5 and save that so that is now our complete uh data model in there so we've got everything that's marked on this page here with all of those things you can go further with this and this is where this stuff allows you to get very complex let me know like what else would you put in here I am happy to do more videos like this if this is helpful and sort of flesh out this model even more if you use chat GPT Chachi PT is actually also quite good at helping suggest a data model what would I need for an asset management app so that's another tip along the way but this really comes down to understanding the requirements so maybe we want locations is the other thing that comes up where are the assets being stored in what locations and so on so you can have all of those other different things let me know what other videos you'd like in this kind of series check out my full model driven apps tutorial here or the shorter version if you don't want to go through the full three hours and as always thank you so much for watching and for all of your support for my channel
Info
Channel: Lisa Crosbie
Views: 32,769
Rating: undefined out of 5
Keywords: power apps, microsoft dataverse, dataverse power apps, what is dataverse, microsoft dataverse tutorial, dataverse tutorial, how to use dataverse, lisa crosbie
Id: iujZ0qplapM
Channel Id: undefined
Length: 42min 9sec (2529 seconds)
Published: Mon Aug 28 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.