1. 60. Modify views
Hello. And in this section, what we’re going to be doing is moving away from canvas apps and going to model-driven apps. So canvas apps are the ones that allow us to design pixel-perfect screens. We can say exactly where we want things to be. We look at data first in model-driven apps rather than layout first. So objects might be resized according to the size of the screen, for instance, and the data is defined in the data verse. So we’re not going to have all of these 200-plus connectors that we were looking at earlier. Instead, we’re going to be looking at our data verse.
So we’re going to start not by actually creating a model-driven app from scratch, but by looking at what the component parts are, or at least some of them. So if I go into my tables for my database and I look at the contact table, we’ve already had a look in previous sections at columns, relationships, business rules, and data. So in this section, we’re going to be looking a bit at views, forms, dashboards, and charts. However, for this particular certification, PL 900, you will not be required to go into great detail. You’ll basically be required to know about it rather than do it.
So let’s just have a look at views to start with, so we can see that in our sample data for our database, there are all of these different views set up. So let’s just click on the first one, “active contacts,” for instance, and we can see what a view is. It’s a table. so I can add additional columns. So I’ll click on a view column, and I can say this particular column, for instance, or I can double click on a column. So let’s say I wanted to know their country or region. So that adds additional columns to our view. So I could do that as well by going to View Column and inserting the columns. You can also modify these views by clicking on these dropdowns and choosing “move left,” “move right,” or “removed.” Or you can insert a new view column in the middle. So that’s all you need to know about views. They are tables. You can add, subtract, sort, and filter. But you notice that the pixel-perfect method of canvas views, of getting all of your controls just in the right place, has completely gone out the window with model-driven apps. So I’ll save that, I’ll publish it, so make it available for use, and I will go back. Views are tables that can be accessed by going to data tables, Views.
2. 60. Modify forms
Now, in addition to tables, which are called views, forms allow for a user interface. They allow people to interact with the data so that the user can do his work. Now there are four different types of forms, and you can see that these forms have been used here as well. First of all, there is a main form. So this is the main user interface for interacting with table data. And needless to say, if you’re going to be using a table-based entity, then you must have a main form in Quick View. So these display additional data for the row that is being shown. So maybe you’ve got a list of all the contacts you click on. One Quick View form can give you additional data. Quick Create, so this provides a basic form optimised for creating new roles, and then we’ve got a card view.
So it’s best to create a presentation in a compact form suitable for mobile devices. So let’s just have a quick look at each one of those. I’m going in the other order. So we start off with cards. So you can see that we have a header, a footer, and the details. Now the details, it’s important to note that you canonly have up to four different items in the details. So when I’m trying to add additional data into the details, you can see a maximum of four fields. The colour-strip section, which is the bit on the left, can only contain one field of a very limited form. So if you want to have different fields here, you’ve got to delete one. So I’ll click on that and go to delete, and then you can add it. So I think the quickest way for me is to just click on the section and then double-click on the field you want to add. So I’m going to save that and publish it. So let’s go back, save, and close refresh. That concludes the card view. Examine the quick create view quickly. So this is here to just create new contacts, and if you want to add additional form fields and you click on “plus form fields,” you’ve also got components such as a linear slider, style rating, and number input. So basically, just things that make it easier for the end user to put in information or display information. The quick view form So this is for displaying additional data. So really, I think the big difference between Quick View and the card is that the card is there for mobile devices, which is why you’re limited to just those four items in the details section, whereas here you’re not so limited. So let’s say I wanted to add an additional form field. You can see that this looks similar to the canvas.
So I’m going to add in the address type. So there we’ve got the address type added in, and of course you can always click on something and delete it. You can also hide labels as well as the phone view to have a more condensed view. So let’s say that we publish that, and then we’ll go back. And then, finally, there’s the main view. And as I said, every table needs to have a mainview for you to be able to display any forms. So here is my Contact main view, and you can see that it is made up of lots of different sections. So you can add a new section by going to this component section and saying, “I want a new one- or two-column section, for instance,” so that pussies at the bottom, and then I can add whatever fields I want. So maybe I need to know the city. So there’s a city; maybe I need to know the country. So again, save and close this and publish these forms. They are a way of allowing user interaction with your data. There are four different types of forms: Main, Quick, Create, Quick, View, and Card, and you can get to those by going to Home Tables and Forms. Just one other thing about forms The types of components you can incorporate also include canvas apps. So if you wanted a canvas app in your model app, you can do that. And in fact, you can also incorporate PowerBI reports into your form as well.
3. Charts and Dashboards
In this video, I’d like to talk about charts and dashboards. So these are two additional elements that you can have in your model-driven app. So you might not be too surprised to hear what these charts and dashboards do. Charts. There are some standard charts that you can have: column charts, bar charts, area charts, line charts, pie charts, funnel tags, and donuts. Donut charts are pie charts with a hole in them, and they might also be separated out, as you can see. You may have bits that are exploded or placed on the other side in order to show a specific section more clearly. So if you want to add a new one of these, then you just click on “new column chart,” for instance, “new bar chart,” or “new pie chart.” And there you go.
You won’t need to know too much about modifying these reports for this particular certification. And then we’ve got dashboards. Dashboards are a combination of charts and streams. Streams are views. There could also be something called cues, which we’re not going to get into in this course. So I’m going to create a new dashboard. So this is my first dashboard, and you can see that I’ve already selected some items. I wanted two charts, so I’m just clicking on one chart.So I’ve got contacts by account, so there’s just a placeholder there. And I’m going to create a second chart or add a second chart to this, the contacts by country, stroke, and region. And then down in the streams, you’ll see that if I click save, it won’t allow it to be saved just yet. I’m going to add a view. So many active contacts So click save and click close. So dashboards allow you to add charts and views together. Charts are your standard charts, similar to the basic charts that you can get in power bi. So now that we’ve had a look at views, forms, dashboards, and charts, we have all the building blocks we need to create our first model-driven app.
4. 59. Creating our first model-driven app, incl. adding tables to app navigation
So here I am, back on the Power Apps home page, and I’m going to click on model-driven apps from scratch. So click “create.” First of all, we need to give it a name. So I’m going to call this contacts app, and we can give it a description that’s optional. This is an app for contacts. You can see that you can include a welcome page for it and a few other items. I’m not going to use an existing solution to create this app. However, I’m just going to start from scratch. The term “electronic commerce” refers to the sale of electronic goods. So let’s click Done, and we’ll be taken to this rather frightening-looking screen. Don’t worry; it really isn’t that scary. Now, just like previously, when we’re looking at business rules, there’s a validate button. So this can be quite helpful. So you can see that our app does not contain a site map. and that’s a big error.
So let’s change that. Click on the pencil mark next to it on the site map. So here we’ve got areas, groups, and sub-areas. We don’t need to get into too much detail about any of these. Let’s just click on the subarea and say, “I want a new entity or table.” So we need an entity or table. So I’m going down to contacts, and that’s it. I don’t have to do anything else. Let’s click “save” and “close.” And our site map has been done. We’ve created a site map, and we’ve added a table or entity to the app navigation. And you’ll notice that in the entity view that we’ve got down here, we now have our contact table, which is made up of forms, views, charts, and dashboards. So if I were to click on forms, it would say, “Okay, what form do you want?” It also says all forms. This may or may not be what you want. There may be far too many. So I’m going to delete them all and just have one of the main forms. You can also look at others if you want. Views. Again, we’ve got all the views. I’m just going to check active, contacts, and charts. Okay, I’m going to leave them all in. Then there are dashboards. We received our first dashboard. So we’re selecting what we want the end user to be able to use. So we’ve got all of these views, forms, charts, and dashboards, but we don’t have to say that we want all of them included in this model-driven app. I could just say I want some of them.
5. 61. Publish and share an app
Now we’re just going to leave it there for this model-driven app. And I’m going to click on Save, and we’re going to click on Publish. And once we have published, we can now play. So here is our app. So we’ve got all of the contacts. When we click on one here, we can see more data about it, including the new section that we have put at the bottom. And there’s so much more that we can look at. We can look at exporting data to Excel, importing it, and looking at dashboards and reports. But this is as far as we need to go for this particular certification. You can see that it’s not pixel-perfect. We have just got broad categories, and in fact, we’re allowing the end user to be able to adjust some things as well. So I’m just going to close that and this now. We go back to our home, and then I’m going to Apps, go down to our Contacts app, click on the dots, dot, dot, and we’ve got Edit, Play, and Share. So this is when you can select people to share your app with.
And you can also give them a particular security role. system administrator that gives you full permission to customise and administer the environment, including viewing all data in the environment. And while System Customizer has the ability to customise the environment, they can only view the data for the environmental tables they create. There are also lots of other security roles. I think the only other one you really need to know about is Environment Maker, which can create new resources. We’re talking about apps, connections, gateway flaws, and the like, but it doesn’t have the ability to access data on its own in an environment. So System Administrator, or Sysadmin as it is known in other technologies, grants you full access, including the ability to view data. System Customizer gives you a lot of permissions, all of them to customize, but only viewing roles for tables they create. The environment maker then does not have any access to data in an environment. So, after you’ve selected the roles you want, you simply click Share, and the end user can then use the web URL, or web address, to gain direct access to your shared app. So in this video, we have created our first model-driven app. We have used forms, views, and other items that we have previously set up, and now we’re able to share them.