Model-driven apps in Power Apps
Model-driven apps in Power Apps provide a no-code or low-code approach to app development, allowing users to deploy a responsive application without the requirement of extensive coding knowledge. These apps inherently use the Dataverse to store data. Dataverse is a Microsoft cloud-based solution that hosts, manages, and secures your business data. In our focus will be creating a model-driven app from tables.
Building a Model-Driven App from Tables
Model-driven apps are excellent for managing and visualizing data from various tables. These tables hold the data upon which an application relies to function.
Step 1: Create a New Table
Open the Power Apps portal, tab ‘Data’, and then select ‘Tables’. Here, you can create a new table by selecting ‘New Table’. You’ll need to fill in the necessary details including the table name, plural name, and display name. Once you’ve filled these out, click ‘Create’ to finalize your table creation.
Step 2: Create Columns
Now that you have a new table, it’s time to create columns to hold the data. Select the ‘Add Column’ option and provide the column details including the display name, datatype, and if the field should be required, searchable, or auditable.
Remember, columns are the structure that stores the data. Their types could be a simple text, choice (picklist), yes/no (boolean), date and time, number (whole, floating point, decimal, currency), etc.
Step 3: Define Relationships
A relationship in Power Apps defines how data in one table relates to data in another table. It helps in creating interactions, dependencies, and connections between tables. You can define a relationship by selecting the ‘Add Relationship’ option in the table and then provide the necessary details – like the related table, relationship behavior, and the cardinality.
Creating a Model-Driven App
Once you’ve defined your tables, it’s time to start building your app. Access the ‘Apps’ section from the Power Apps portal and click on ‘Create App’. Choose ‘Model-driven’ from the types of apps. Provide a name for the app and then click ‘Create’.
Designing the Interface
In this stage, you’ll be working with elements such as forms, views, charts, and dashboards. A form is an interface for users to input and edit data in the table. Use the app designer to drag and drop fields onto the form. Views provide a list of records from the table, and charts give a visual representation of data.
Adding Business Logic
Power Apps provides features to apply business logic without writing code. For instance, business rules can be added to perform certain actions when conditions are met. Similarly, workflows can automate business processes.
Publish and test the App
After you have designed your app, you must publish it to make it accessible to your users. From the Power Apps portal, select ‘Apps’, open your app and select ‘Publish’. Once published, it’s critical to test the app in different scenarios to ensure its functionalities work as expected.
In conclusion, model-driven apps provide a flexible, user-friendly digital solution to your business’s data. Keep in mind that although creating a model-driven app includes several steps, each is vital to ensure the best performance and results. Going through the process step by step allows you to get a better understanding of your data and how to best utilize it.
With the ability to draw directly from tables with Power Apps, model-driven apps provide a foundation for customization while leveraging the insights from the data you’ve gathered. Whether you’re tracking inventory, managing contacts or orders, or scheduling projects, model-driven apps are designed to streamline your business processes with a seamless and pain-free implementation.
Remember, for the PL-900 Microsoft Power Platform Fundamentals exam, understanding the way model-driven apps are designed and function is key!
Practice Test
True or False: Model-driven apps are built based on the database structure.
- True
- False
Answer: True
Explanation: Model-driven apps start with your data model – building up from the data model (tables) by defining the forms, views, and other components.
In Microsoft Power Platform, you use which of the following to create a model-driven app?
- A) Tables
- B) Modules
- C) Microsoft Excel
- D) None of the above
Answer: A
Explanation: The basis of creating a model-driven app in Power Platform involves tables.
True or False: Model-driven apps have a responsive design, which adjusts to different devices including phones, tablets, and computers.
- True
- False
Answer: True
Explanation: This is one of the core advantages of model-driven apps – their responsiveness to different device sizes and platforms.
Which of the following cannot be added to a model-driven app in Microsoft Power Platform?
- A) A table
- B) A dashboard
- C) A business process flow
- D) A PowerPoint slide
Answer: D
Explanation: PowerPoints are not a component that can be added in a model-driven app in Power Platform.
True or False: A model-driven app only accepts data in numerical form.
- True
- False
Answer: False
Explanation: Model-driven apps can handle a wide variety of data forms, not only numerical.
Can more than one table be added to a single model-driven app in Microsoft Power Platform?
- A) Yes
- B) No
Answer: A
Explanation: Multiple tables can be associated with a single model-driven app depending on the complexity of the app.
True or False: You can’t share a model-driven app with a group of users in Microsoft Power Platform.
- True
- False
Answer: False
Explanation: Model-driven apps can be shared amongst multiple users or groups of users.
Which of the following is not a component of a model-driven app in Microsoft Power Platform?
- A) View
- B) Form
- C) Dashboard
- D) E-mail account
Answer: D
Explanation: Email accounts are not a component of a model-driven app in Power Platform.
True or False: Model-driven apps automatically generate a user interface.
- True
- False
Answer: True
Explanation: Model-driven apps take the description and other metadata from a data model to auto-generate a UI.
What is an initial step in creating a model-driven app in Microsoft Power Platform?
- A) Define the app’s behavior
- B) Design a user interface
- C) Set up the table structure
Answer: C
Explanation: Before anything else, you define the data structure by setting up tables.
When setting up a table for a model-driven app, what is NOT one of the things you define?
- A) Columns
- B) Rows
- C) Relationships to other tables
Answer: B
Explanation: You define the types of columns and relationships to other tables, but not specifically the rows in them.
True or False: Model-driven apps require hard coding.
- True
- False
Answer: False
Explanation: Hard coding isn’t a necessity because these apps are built around the data model, and Power Platform provides point-and-click user interfaces for building the apps.
Is it possible to have a custom table in a model-driven app?
- A) Yes
- B) No
Answer: A
Explanation: Custom tables can be created and linked to model-driven apps in Microsoft Power Platform.
True or False: Dashboards in a model-driven app can display data from different tables.
- True
- False
Answer: True
Explanation: Dashboards integrate data from different tables and present it comprehensibly.
In a model-driven app in Microsoft Power Platform, what does a Business Process Flow do?
- A) It displays data
- B) It guides users through a business process
- C) It connects to external APIs
Answer: B
Explanation: Business Process Flows in model-driven apps guide users through specific business processes. They outline the steps taken in a business process.
Interview Questions
What is a model-driven app in Microsoft Power Platform?
A model-driven app in Microsoft Power Platform is an application that is primarily driven by data model and business processes. It allows for quick development and deployment of applications by making use of underlying data framework.
What is the primary step in creating a model-driven app from tables?
The primary step in creating a model-driven app from tables is defining the data model, i.e., setting up the tables that will hold the data.
How do you set up the business process flow for a model-driven app?
You can set up the business process flow for a model-driven app in the Power Apps Studio by selecting the Business Process Flows option and then designing it using the intuitive drag and drop interface.
What is the role of a navigation pane in a model-driven app?
The navigation pane provides a navigation to the different components of the app, such as dashboards, forms, views and other related tables.
Can you modify a table in a model-driven app once it has been created?
Yes, you can modify a table in a model-driven app by going into the solution, selecting the table and then adding or removing fields as needed.
What is a dashboard in a model-driven app and what is its purpose?
A dashboard is a customizable view in a model-driven app that displays various types of data simultaneously. It provides a consolidated view of business data tailored to a specific role or need.
How do you add a new form to a table in a model-driven app?
You can add a new form to a table in a model-driven app by going to the table and clicking on “Forms”. Then click “+” to add a new form.
What is a view in a model-driven app?
A view is a customizable screen in a model-driven app where you can define what data from the table is displayed and how it is displayed.
What is the purpose of business rules in a model-driven app?
Business rules in a model-driven app allows you to apply business logic without the need for coding. They can be used to set field values, clear field values, hide or show fields, etc.
Can you import data from external sources into a table in a model-driven app?
Yes, you can import data from external sources into a table in a model-driven app using the data import wizard in the Power Apps Studio.
How do you publish a model-driven app?
You can publish a model-driven app by saving your changes and then clicking on the “Publish” button in the Power Apps Studio.
What is the difference between a canvas app and a model-driven app?
The main difference between a canvas app and a model-driven app is that a canvas app starts with a blank canvas and is designed pixel-by-pixel, while a model-driven app starts with the underlying data model.
How do you add a related table to a form in a model-driven app?
You can add a related table to a form in a model-driven app by going to the form editor, then dragging and dropping the related table onto the form.
How do you secure data in a model-driven app?
You can secure data in a model-driven app by defining security roles and applying them to users or teams. Security roles define what records the user or team can read, create, update, or delete.
Can you integrate a model-driven app with other Microsoft services?
Yes, you can integrate a model-driven app with other Microsoft services like Office 365, Dynamics 365 and Azure through the use of connectors available in Power Apps.