Introduction

Completed

Previously, by using a Microsoft Excel worksheet as the method to track company accidents, people could view and review logged accidents. This method also offered users the ability to filter the Excel rows based on the cell's criteria. Currently, the role of a table view is to give the user that same ability in the model-driven app. With views, users can review accident records without the risk of overriding or deleting data or causing errors, which are common issues in Excel.

Note

If you haven't completed the previous modules within this learning path, download the packaging files. These files contain the completed work on the Accident Tracking app thus far.

Views define how a list of records for a specific table will appear in your app. Additionally, views define the columns that are shown and the width, sort behavior, and default filters of the records that are shown in the list. Views are a way for you to present data to the user for review only.

Screenshot showing a sample view of the accident tracking table.

The tables that you created in the previous module have a set of default views that you can use to show meaningful data to the users. In this module, you'll focus on modifying these default views; however, keep in mind that the same concepts would apply if you wanted to create a new custom view(s). For more information, see Understand model-driven app views.

Now that you have an overview of views, you can begin your first exercise and observe how to modify a default table view.

Modify default table views

In this section and the next exercises, you'll modify the standard views from the tables that you created in the Build the Dataverse table schema for the model-driven app module. You'll turn these views into the one place where app users can review the data that is stored in the tables. Then, you'll make sure that the presented data is organized and relevant to the app user. For example, you want to make sure that the app user can review all data that is relevant for an employee under one concise list.

Sign in to Microsoft Power Apps and then follow these steps to modify default views:

  1. To get started, go to https://make.powerapps.com and sign in with your Microsoft credentials.

  2. In the left navigation pane, select Tables.

  3. Search for the EmployeeTable that you created in the previous module. You can quickly finding it by typing employee in the search field at the top right of the screen.

    Screenshot of the filter and the search bar in Microsoft Dataverse.

  4. After you have located EmployeeTable, select it, and then select Views from under the Data experiences pane.

    Screenshot of views in data experiences.

  5. From the Views list, locate and select the Active EmployeeTables view. The Microsoft Dataverse View designer studio opens with your selected view.

    Note

    Under the View type are several different types of views. Essentially, the different view types present the same information, but it might be filtered on active versus inactive employees or some other filters. You can mix these views so that users can select from them as preset filters to find relevant data more easily in the model-driven app. For this exercise, you will modify one view.

    On the left side of the screen is a panel called Table columns which shows a list of columns from the EmployeeTable and the existing tabular view on the form canvas itself (like an Excel sheet) showing the selected columns.

    The goal is to select columns relevant to users when they want to review employee information. Let's customize this view to include employee name, employee date of birth, employee ID, and employee email.

  6. By default, this view already has the EmployeeId column and the Created On column. We don't need Created On so let's remove it from the view. Select the Created On column header, and from the bottom of the popup dropdown menu, select Remove. The Created On column disappears the view. Notice how the column shows up in the Table columns panel after removal. So, if you accidentally remove one, it's easy to add it back.

  7. Add the EmployeeName column to the view by selecting it or by dragging and dropping it onto the view grid.

  8. Add the columns EmployeeDOB and EmployeeEmail. Your view should show the columns left to right: EmployeeID, EmployeeName, EmployeeDOB, and EmployeeEmail. You can drag and drop the fields to get them in the right order. Your view might not have any data yet, but the columns should resemble the image below.

  9. In the upper-right corner, select Save and Publish to save and publish your changes.

    Screenshot of the Publish option highlighted.

Now that you understand the basic mechanics for modifying views. Let's modify some more table views.