Power Apps Model-Driven Apps: Tutorial for Complete Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video is a tutorial for complete beginners on model driven powerapps i'm going to take you through the concept of what a model driven app is how to build one and what the possibilities are for it so let's get into it and i'll show you what it's all about let's start by having a look at a finished model driven app which i think is the best way to get you across the concept here it's called a model driven app because it starts with a data model that we're going to build on microsoft database now if you've ever done anything with databases or with crm systems or with access or anything like that that's the zone we're in here so the idea here is that you can think about what types of data do i need and what to collect for my organization how do they relate to each other and the concept of a model driven app is that you are building with this platform from the ground up the exact data model and structure and relationships that you want as well as how all of that is displayed on the screen to the user there's a lot going on here and so we're going to go through those core concepts to help you get started with building it this is actually the same capability that sits underneath dynamics 365 sales customer service and so on so what you've got is all of that platform capability to build your own adventure but if you have a look at something like dynamics 365 sales which is a fully built crm system that is actually also a model driven app far more complex end but you can do quite basic things right through to those complex things with this technology so the model driven app that we've got here is all about ordering equipment for an office so let's say i'm in an office administration scenario this could make my work a whole lot easier i've got my navigation menu down the side here and you'll see in my equipment ordering section i've got a list of all of the different types of equipment so say the printers and chairs and desks and things that we can order as well as a place to store and manage the orders that are coming in related to those pieces of equipment what i'm looking at on the main part of the screen here is called a view so this is a list admittedly a very small one but good enough for demo purposes of all the different types of equipment that we've got and i can actually use this to sort in alphabetical order i can filter and so on and manage that as a list of things in the database you'll see across the top here that there's a lot of different commands already built in including a lovely export to excel button which is everybody's favorite thing all of that is built in for you when you create a model driven app i haven't had to code or do any of those things this is also fully responsive and accessible interface again done for you when you click that button that says new model driven app so we've gone through our view here let's click through and have a look at one of these rows and what we're looking at on the screen now is called a form so form gives us all of the detail all of the columns that are part of this data table so for a piece of equipment i've got information here about the um the model number the price the equipment type and so on and all of these are different data types so as we go through and build it you'll see these things that we've got a model number this is a price which is a type of currency this one is called a choice so we can choose from a list of options this one actually allows us to have a bigger text area box and you can if you want to bring rich text formatting into there we can also bring an image in there and so on now let's say that somebody wants to place an order for one of these we can go into the equipment orders and have a look at an order that already exists but you can also use this app to create these what we've got across the top here is a business process flow which is guiding the user through the steps and stages of the process so you can see that the order is received we go through an approval process of some kind and then a procurement process of some kind and what we've got here is a link to the user in the system who placed the order we've also got the equipment and you'll see we're bringing in some of that information this is all locked down because this is just read only when i've chosen that that that brings in that information about the equipment we've also got some information here about the order status and the date and how things are going and who is approving that particular order if i was a user wanting to place an order i could go in here and click new and i would get that blank form and i could create that from scratch and put in my order and submit it through so that's essentially what we're doing with a model driven app here is we're creating these different types of data relating them to each other creating views that columns set up and forms for the full display so that users can create rows and people can read them manage them take them through those business processes you can report on them and so on and as i said this is a nice simple example so let's get started and i'll show you how we build this so to get started with building a model driven app you need to go to make.powerapps.com we will see model driven app from blank in there but we're actually going to start with building our data and data tables first now importantly your data tables from model driven app are built on microsoft database this is your data source for a model driven app to get all of the capability required you can't take sharepoint lists or excel spreadsheets and use those as the underlying source for a model driven app so we are working in dataverse here just to show you what happens when you've got database deployed in powerapps environment if i go across here to data and tables you'll see a bunch of things that are already here so this is just out of the box stuff to help you with commonly used types of tables so we're going to go through and build this custom application that uses equipment and equipment ordering but we've also got in here things like account and contact so things that are very commonly used and just to give you a sense of what this looks like this is the accounts table we've got a bunch of different columns in here and you can see they've got different data types so we've got things in here that are choices or text or numbers and dates and so on you can actually customize this you can add your own bits in there so for instance if you're working with an account and you want to have like a priority of gold silver bronze or however you want to do that you can add that column in here you can take it as it is or you can leave it completely if it's not relevant for your app so as you're building your model driven out be aware that there are all of these kind of standard things in here the most commonly used ones really are account and contact so if you're doing anything that involves customers use those inbuilt tables because a lot of the work is already done for you and the other thing that's already built in here is activities so things like being able to track phone calls and emails and tasks and things that's already in there as well so you don't have to build any of those things now to get started with building our data tables there is a new table button up the top here i'm going to show you one other thing that's best practice that you really should be doing rather than just creating in here which is to work in the part of the platform which is called solutions and essentially this creates a bucket an empty bucket and all of the things that we create and build we're going to do inside that bucket and bring them in there what that means is that for our app we've got all of those components visible in the one place we can package it up and move it through a life cycle of developing the application from development to testing to production and so on don't need to worry about that too much for a beginner's tutorial but just to help get you started in the right place it's always good to create a solution so i'm going to call this one equipment ordering and i am going to just select the default publisher for that solution and we will give it a minute or so to create if i click into that now i've got my nice empty bucket to start building and from here i can choose to create a new table now this is a drag and drop experience we're creating a database here with no code the first thing i'm going to do is create a table for those pieces of equipment so we're going to call this table equipment and you'll see it automatically gives it a plural name which in this case that you don't need equipments because that's not how it is in english we have a schema name which is the technical name that sits underneath and a primary name for the equipment which is going to be the the title field now as that spins up what you'll notice it'll say provisioning your table oops quite quick your table has been provisioned successfully and then this is where people often freak out look at all this mess what's going on here this is part of the scaffolding of your model driven app stuff that you don't have to build and you don't even have to think about so what we've got in here is things like created by created on modified by modified on all of those things that allow you to track auditing type things just did that for me though did that take like 10 seconds i didn't even finish explaining it before it came up on the screen we've also got owning team owning user so the concepts of being able to have ownership and security around who can access what are enabled by that and we've also got a status and status reason so that allows us to have records that are active or inactive so that you can have like a soft delete type of capability so all that just happened with the model driven app i said create a table and it gives me all of that scaffolding now fascinating and useful as that is it's quite a lot of clutter on the screen so if you go up here and click custom that will take you back to just being able to see the things that you are actually working with which is a much cleaner and easier experience all right so let's go ahead and build our table by adding columns in here and so each time we add a column we're going to give it a name so the first thing i'm going to create is a description column and then the important thing here and you can't change this after you've created it so this is where you need to think about that table and column design is what type of data is this so we've got text a single line of text i'm actually going to make this one a text area so that i can have more like a paragraph multiple lines of text but you'll see there's lots of other different data types in here and we're going to go through a few of these as we build out the rest of our data model we've got things like dates different types of numbers currencies choices those kinds of things available to us in the app but you do need to pick one and you can't change this afterwards we've also got the ability to choose which columns are optional or required i'm going to say this one is optional we'll come back and make one required in a moment and we've also got advanced options here and for this one because it's a text area i want it to have more than a thousand characters i'm going to up that to 2000 characters and click done let's keep going let's add another column this time i'm going to add one for the price and the price is actually going to be a currency now when i create a currency column that is a very special type of column that has some built-in capability to do things like currency conversion let's also add a model number for reference and this is just a text so it's not actually a number it's just it could be you know qr 123 or something like that let's make this one required so you can't create something unless you've filled that one in and we will add that one in there let's also add a column for the equipment type so that we've got a drop-down list of options to choose from so this is called a choice the difference there between choice and choices is one is a single drop-down choice and the other is like a multi-select choice in this case equipment type is only going to have one option so we're going to give it a list of options here we've got a new choice we're going to say let's say we've got desks and chair and printer and so now what i've done is i've created a choice column i've gone in and edited the list of choices and now i've come back to my choice column and i'm going to say we don't have a default value but you could choose that if you wanted to and add that one in there so once all that's done we click save table and you'll see these things in bold will go back to normal because we know that those have been saved now let's create the components for the app that allow you to see the columns which is the view and also to click through on one of those and open a form to get the full details about that row so we start with a view there's a bunch of things sort of ready for you to work with and edit here i'm going to click on active equipment and this is a nice drag and drop experience you'll see it starts with name and created on not particularly interested in that one so i can remove it and then i've got the columns that i added for this table here and i can just click on those to put them in the view so i will have the model number the equipment type and the price if i decided i wanted those things in a different order you can just drag and drop those around and you can also set up sorting and filtering so at the moment we're just looking at all of the active equipment so if i wanted to deactivate anything it would just sit outside that list but you could filter you could sort by price you could sort by any of those columns in there that'll do for now let's save that one and we will go back and now let's create a form and again we've got a bunch of things ready to go we're going to be working with the form that's called the main form and that just comes through with the name and the owner now the form actually has a header which allows you to put some things up in the top generally speaking we might pop this owner up into the header let's get that out of the way and put it up there this is again drag and drop interface so with the form we've got different components and layouts and things that we can work with if i click here i can have a look at the formatting and say actually i want that to be two columns i can go over here and get to the list of the columns that i've got in here these are all of the ones i created before so we'll see we've got the name let's say i will have the name and the model number and the description now i can move things around again i can drag and drop if i want equipment type and say i want that up there i can move it in there or actually no i think i want to have that over in the other column there and let's bring the price in here as well so you can get very sophisticated with your form design that's a whole other tutorial nice drag and drop experience to get that stuff on the screen let's save that one as well and we will go back to our solution now i'm going to create another data table to show you the relationships and how that works so i'm going to go back a little so you'll see i'm in solutions equipment ordering and that equipment table go back a level into my solution and i'm going to create a new table and this time i'm creating the table that allows us to manage that ordering process related to those pieces of equipment so i'm going to call this one equipment order and you'll notice it gives it correct plural name and this time instead of the display name being the name i'm going to call this one order reference and we will create that now this time we're going to put some dates in here so that we can manage things so let's put in something for the date that the request was made and i'm going to choose from here we can choose date and time or date only in this case i really only want that to be a particular date and let's pop another date in there which is going to be the order placed date so we've got a process here of going from somebody requesting something through a procurement process of somebody ordering it let's pop in date only and choose that one as well all right we can also have an approval process so we can have approval status and that would be a choice because we want someone to choose from the list of options again a list of choices here so we'll pull this one approved or rejected now there is inbuilt capability for managing approvals within the platform again another tutorial to come back to so we've now got our dates let's also add in here a link back to the equipment because after all who's someone's placing an order so we need to link it up to who's placing the order and which piece of equipment they're ordering so this is now creating a relationship between those two data tables the easiest way to do this is to say i'm going to look up equipment and if i go in here there's a special data type called a lookup and that says i'm going to create a column in here which looks up to that other table and creates that link remember that we saw when we did the demo of the app at the start and i'm going to scroll down here and find the equipment table and link those two up and so if we go into the relationships tab here you'll see that that's created a many-to-one relationship between the equipment order and the equipment now this is where we start to get into database concepts but we didn't even really have to know it because it just did it for us by creating that lookup just for reference that concept of a mini to one relationship or a one-to-many relationship if you think about say you've got accounts and contacts you've got one organization and many people who work for it that's a one-to-many relationship all right so now we've got all of those things there let's save that table and we're also going to create a view and form for that one a bit of reinforcement of what we just did before so let's whip through this fairly quickly since we've seen it once already order reference created on don't need it let's add all of these other columns in and get them in an order that makes some sense so let's say we have the request date the approval status the order placed and the equipment there save this gets fast once you've done it a lot of times and let's also add a form so again we've started with the name and the owner we will drag the owner up into that header section get it out of the way and this time what i'm going to do is add a component onto the form to show you that so i can add another section so you'll see what this allows me to do is to put in something like let's say i call this one order process so that i can grip things together on the form that makes sense so i could bring in go back to my list of columns here i could bring in for instance my request date and my approval status and water placed all in there together bring that one back over here and i could put my equipment up in the top and there we go there's another form that'll do you can get very very sophisticated with this stuff that'll get us going as a starting point all right so then the one thing we're going to do now to finish off is to create that business process flow that goes across the top of the screen so to do that what i'm going to do is actually leave my solution for now and go into the inbuilt flow part and create what's called a business process flow and i'm going to bring that one back into our solution so from here i click business process flows and create a new one this one is going to be called our equipment order process first thing we need to do is to choose which table this relates to so this is actually going to be related to that equipment order table that will bind it and allow us to pick up the different kinds of data points that we've created on that table and also to display it on that form in our app so now we can build out that process flow in this lovely visual designer we've got stages and then steps that sit under each stage so if i click on this first stage we're going to give it a name so we'll call this one request placed or something like that and apply that let's build out the other stages in that process as well so we can say here let's add another stage and we will call this one approval apply that and one more stage for procurement and we're done all right now each of those stages has to have at least one step under it and you can have within here lots of different steps or just one you can also put branching logic in here if you wanted to take users down a different path depending on what happened in the previous step so let's say here we have got in our request we're going to put in the request date we'll pop that one in there in our approval stage we're going to put in the approval status now i'm keeping this very simple but you can start to build out really complex processes and guidance with this kind of thing again another tutorial on that so here we're going to pop in our um order placed date and apply that now when it's all done save it and we also need to go through a process here of validating it which makes sure that the process is valid that you haven't put in any logic there that won't work nice and simple validation successful and one final stage is to activate it which means it becomes available to use in our apps all right that can take a minute or so and then when it's done you'll see that activate has been changed to deactivate then we're good to go and you just close that tab down we go back to here and one more step here we just turn that one on so that it's ready to use all right now i'm going to go back into my solution two more steps to go and bring that process in and then we're going to create our app from all of this so first thing i'm going to do go into my solution and add an existing thing this time i'm going to bring in a process and there's a lot of out-of-the-box processes in there that we don't need to worry about i will just search for my equipment order process and add that into my solution and let's publish all of the customizations so there's a concept here of saving and then publishing saving is what we've been doing all along as we build things publishing pushes the changes live so that they're ready to use let's create our app which brings all of these things together into that app and by going in here and saying new model driven app first thing that happens is it does all of those things we saw at the start it's building a responsive accessible interface it's putting in all that inbuilt stuff with the commands and with the export to excel and so on this is just bringing all of those data tables and pieces in together so i'm going to call this one my equipment ordering app and because i've used a solution i can check this box and make it a whole lot easier for myself because just choosing that solution that i have created will automatically bring all those pieces in there now this is a little bit of a mess if you first see it but basically what we've got is it's brought in my equipment and equipment ordering tables it's also brought in that business process flow that i created so now the thing we need to do is create the site map which is that navigation menu that we saw at the start that sits down the left hand side and we can have different areas and groups and sub areas to get that hierarchy of the menu so i'm just going to call my heading here office admin and then my first sub area is where i can bring in those tables now this is a slightly older part of the user interface tables and entities are the same thing entity is the old name for table first thing i'm going to do is bring in my equipment order table and then i'm going to add in another sub area underneath that and i will choose another entity or table and we'll bring the equipment one in there and save that and publish it so that's our site map done now we need to just go back to the app designer so back a level in the hierarchy save the app so we've gone from an app to the site map save and publish the sitemap come back into the app and save it let's do a validation step warnings i don't worry too much about if you've got errors in your app you'll see it there let's publish that app and then one button left to press let's do this play here we go we built a model driven app now this will look similar to what we had at the start there's more to it that you can add in if you want to so let's go in and start to put some data in there because there's nothing in there so let's say we have got some equipment in here so we could have um standing desk model number h445 all right equipment type there's our choices so we've got this one's a desk and the price for this one could be 299 and we will save and close that so you'll see if i go back here's my list let's add another one just so that we can start to get this we'll call this one gaming chair because you know maybe this office is really into this this one can be g red now you can also format that description to have more space on the field if that's uh more space on the screen if you want let's say that's 150 and save and close that so there we go we've got a couple of different pieces of equipment in there so now let's go in and place an order i could go in and say new order and my order reference again you can have auto numbering and things in here if you want but let's call this one you know 334 and equipment is a lookup so these are the ones that i just created the gaming chair and the standing desk i reckon i'll go for a gaming chair why not i can put in my request date which is today and then i'm going to leave these other things now other things you can do in the app you can make fields locked down to be read-only you can calculate things as i said lots more that we can do in there past this beginner level we will save and close that one and if we go back in here we can see it's sitting at that request stage and this allows us to move through those steps and stages so perhaps now i'm working in the procurement department i come in i can move it through to the next stage trigger and approval and so on so there you have it model driven apps and all of the core concepts we've created a solution we've created tables we've created columns on the tables of different data types created a relationship between those tables views forms a business process flow bringing all that together in an app with a site map down the side those are all the core concepts you need and you can build on that from there and build amazing things i hope that's been helpful thanks for watching
Info
Channel: Lisa Crosbie
Views: 27,970
Rating: undefined out of 5
Keywords: model driven power apps, power apps model driven app, power apps, powerapps, model driven power apps, model driven powerapps, model driven powerapps tutorial, power platform model driven apps, learn powerapps, powerapps tutorial for beginners, microsoft power apps, model driven apps, model driven app example, model driven app, powerapps model driven apps, what is model driven app?, how to create model driven powerapps, common data service, cds, microsoft dataverse, dataverse
Id: sRoRrteFkuQ
Channel Id: undefined
Length: 26min 15sec (1575 seconds)
Published: Mon Jun 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.