Practice Lab 3 - Create a model-driven app

Estimated time: 30 minutes

Lab objectives

In this lab, you will learn to:

  • Understand the difference between canvas apps and model-driven apps
  • Create a model-driven app using the modern app designer
  • Add a Dataverse table to the app’s site map
  • Customize the main form and view for the table
  • Publish and test the model-driven app

Scenario

While employees submit requests using a mobile canvas app, the Contoso facilities management team needs a full-featured desktop application to manage, triage, and track all requests. Model-driven apps are ideal for this because the interface is automatically generated from the data model, providing a consistent and professional experience.

Exercise 1: Create the model-driven app

Task 1: Create a model-driven app

  1. Navigate to Power Apps Maker portal https://make.powerapps.com and sign in.
  2. Select + Create from the left navigation, then select Blank Page with navigation.
  3. Name the app Contoso Facilities Management and click Create.
  4. The modern App Designer will open.

Task 2: Add the Facility Request table

  1. In the App Designer, select + Add page or + New, and choose Dataverse table.
  2. Search for and select both the Facility Request and Rooms tables (if you completed Lab 1), additionally choose the Account and Contact tables.
  3. Make sure the Show in navigation checkbox is selected and select Add. The tables will now appear in your app’s navigation.

    Screenshot of Navigation

  4. Under Navigation, select New Group.
  5. On the right side of the screen, expand the New Group pane.
  6. Change the title from New Group to Customers.
  7. Select the three dots next to the Customers group and choose New group.
  8. Change the Name of the New Group to Facilities.
  9. Under Navigation select the Facility Requests view, select Move Down until it is in the Facilities Group.
  10. Select the Rooms view and Move it down below Facility Requests.
  11. Select the Save button.
  12. Your completed App should resemble the image below:

    Screenshot of updated navigation

Exercise 2: Edit Facility Request form and Facility Request public view

Task 1: Modify the Facility Request main form

  1. Open a new tab and navigate to the Power Apps Maker portal https://make.powerapps.com
  2. Make sure you are in the Dev One environment.
  3. In the left navigation pane, select Tables.
  4. In the search bar at the top-right, type Facility Request, and then select the Facility Request table from the results.
  5. Under Data experiences, select Forms.
  6. Select the Information form where the Form type is Main, select the Commands menu (…), and select Edit > Edit in new tab.
  7. Drag the Owner column into the Header area.
  8. Drag the Description column below Request Title.
  9. Drag the Date Requested column below Description.
  10. Drag the Estimated Cost column below Date Requested.
  11. Drag the Category column below Estimated Cost.
  12. Drag the Priority column below Category.
  13. Drag the Status column into the Header area.
  14. Select Save and publish.
  15. Close the form designer.
  16. Select Done

Task 2: Modify the Facility Request public view

  1. Navigate to the Power Apps Maker portal https://make.powerapps.com
  2. Make sure you are in the Dev One environment.
  3. In the left navigation pane, select Tables.
  4. In the search bar at the top-right, type Facility Request, and then select the Facility Request table from the results.
  5. Under Data experiences, select Views.
  6. Select the Active Facility Requests view, select the Commands menu (…), and select Edit > Edit in new tab.
  7. Select the caret next to the Created On column and select Remove.
  8. Select the Description column to add to the view.
  9. Select the Date Requested column to add to the view.
  10. Select the Estimated Cost column to add to the view.
  11. Select the Category column to add to the view.
  12. Select the Priority column to add to the view..
  13. Select the Status column to add to the view.
  14. Select Save and publish.
  15. Close the view designer.
  16. Select Done

Task 3: Publish and test

  1. Navigate to the Power Apps Maker portal https://make.powerapps.com
  2. In the left navigation pane, select Apps.
  3. Select Contoso Facilities Management Model-driven app, select the Commands menu (…), and select Edit.
  4. Click Save and Publish in the upper right.
  5. Click Play to open the app in a new browser tab.
  6. Verify the following:
    • The navigation menu shows your Facility Request table.
    • Clicking the table name shows the list view with the columns you configured.
    • Clicking on a record opens the form with the layout you customized.
    • You can create a new record by clicking + New. **