In a model-driven app, a View is the UI element that represents how a table of data is to be displayed. In defining a view, we can specify:

  • which columns are to be displayed
  • the order of the columns
  • the default sorting
  • any applicable filters

So far in our LaRusso Autos app, we’re just using the default filters for each table entity – the Active and Inactive filters. We’ve already shown how users can filter view data as they please – to recap, here is the list of Active Manufacturers being filtered by Country.

Whilst this is useful, it can become tedious to apply filters every single time we access the data we really want to work with. For that reason, it makes sense to have multiple views, each with different filters applied by default.

For this exercise, we want to create two separate views for our Vehicles table:

  • Sale Vehicles – Vehicles for sale
  • Sold Vehicles – Vehicles that have been sold

To start, we need to add a new column to the Vehicle table – Sale Date. This is an optional Date and time field – vehicles that have been sold will have a sale date; those that have not been sold won’t. From our solution view, select Tables > Vehicle > Columns from the side navigation. Click on + New column from the top ribbon, and fill in the New column form.

Click Save, then choose Tables > Vehicle > Forms from the side navigation. From the forms displayed, select the Main form to launch the form editor. Drag and drop the Sale Date property onto the form and then click Save and publish.

Pages: 1 2 3

2 responses to “Creating Custom Views in Model-Driven Apps”

  1. Building Canvas Apps Part 4: Filtering Datasets and Delegation with Power Automate – Power Platform Pete Avatar

    […] from the side navigation and create a new view called “My Service Workload” (see this post for a reminder on creating […]

    Like

  2. Power Automate, Power Apps and Microsoft Forms – Power Platform Pete Avatar

    […] and Icon for our Survey Response table – if you would like a recap on this, take a look here, here and here! I’ve added a new page for Survey responses to the Dojo Membership app – all […]

    Like

Leave a reply to Power Automate, Power Apps and Microsoft Forms – Power Platform Pete Cancel reply