Exercise - Create an app and add columns to the Machine Order table

Completed

In this exercise, you create a standalone model-driven application that uses the same Machine Order table that you created in Microsoft Dataverse.

Note

This module is designed for use with the App in a Day instructor-led course. For more information on attending this free, instructor-led course, see Microsoft Power Platform instructor-led training. On that page, you can Register for an event.

Note

To complete the exercises, you'll need to use a few files. Download the App in a Day files for use in this module. The file folders that are in this download include:

  • Completed modules with instructions - Package files to import the completed exercise steps.
  • Machine-Order-Data.xlsx - File used in the exercises.

Section 1: Create an application

Your first task is to create a model-driven application. This application serves as a container to identify all components that make up the application. It will also include a site map that defines the custom navigation that people use to navigate between the components (table views, dashboards, and other visual components).

  1. Go to Make Power Apps and select the environment that you created.

  2. Select Solutions and then open the Contoso Coffee solution.

  3. Select the + New drop down from the tool bar at the top of the screen and then select App > Model-driven app.

    Screenshot showing the create new model-driven application button.

  4. In the New model-driven app form, enter Machine Procurement in the Name field and then select Create.

    Screenshot of the New model-driven app form, showing Machine Procurement in the Name field.

    Next, in the following steps, you'll build a site map for the application. When it's completed, the site map will resemble this image.

    Screenshot of the site map with orders and machine orders.

  5. Within the Pages pane to the left of the screen, hover over Navigation. Then, select the ellipsis and choose New group from the menu.

    Screenshot showing the New group option from the Navigation menu.

  6. Within the New Group pane to the right of the screen, under the Display options section, enter Orders in the Title field and nav_ordersgroup in the ID field.

    Note

    The properties panel on the right will only show if you have the New Group selected from the pane to the left.

    Screenshot of the Display options pane with information filled in the Title and ID boxes.

  7. Select the ellipsis (...) next to the Orders group from the Navigation pane and select New page.

    Screenshot of the New page option.

    Note

    The properties panel on the right will only show if you select New page on the left.

  8. Within the Add page dialog, select Dataverse Table from the option list.

    Screenshot showing Dataverse table option selected for the content.

  9. In the Select a table dialog, search for Machine Order then select the checkbox for the Machine Order table, then select Add.

    Screenshot showing Machine order table selected within the New Page dialog.

  10. Within the Machine Orders pane to the right of the screen, under the Display options section, enter nav_machine_orders in the ID box.

    Screenshot showing a navigation subarea with information filled in.

  11. The application should now resemble the following image. Select Save and Publish.

    Screenshot of the Save button.

  12. Select the Back button to navigate back to your solution.

    Screenshot showing the Back button.

Section 2: Add procurement columns to the Machine Order table

In this task, you add new columns to the Machine Order table. The columns that you'll add will support the business process flow, which you'll build in the next exercise. When you use a business process, it consists of stages, which you can consider major milestones in completing the work. Each stage has one or more steps. These steps help users keep track of what they need to do before advancing to the next stage. Steps are simply columns on the table. To accelerate the process of creating the business process in this task, you'll first create the columns that you need.

To support this scenario, you add the following columns to the table:

  • Capital Approved - You use this column in the flow to capture that the machine order has received capital approval.

  • Send Survey - You use this column in the final stage. Currently, the team plans on manually sending a survey to determine how the user's ordering experience was, and they'll manually verify this fact after they've sent the survey. However, the team wants a future update to automate sending a survey in a future release.

  1. Go to Make Power Apps.

  2. Select Solutions and then open the Contoso Coffee solution.

  3. Select Tables and then open the Machine Order table.

    Screenshot showing the Machine Order table.

  4. Select + New > Column.

    Screenshot showing the add new column button.

  5. Enter Capital Approved in the Display name field, select Choice then Yes/No from the Data type dropdown menu, and then select Save. A Yes/No data type is used in this case because, when you use it as a step in the business process, you want the ability to mark it as completed. The Yes/No column type is similar to a true or false column.

    Screenshot showing a yes no column type.

  6. Create four more Yes/No columns and name them Machine Received, Machine Configured, Send Survey, and Machine Delivered.

    Screenshot of the Machine Received pane.

    Screenshot of the Machine Configured pane.

    Screenshot of the Send Survey pane.

    Screenshot of the Machine Delivered pane.

  7. Add another column with the name of Supplier Order ID, select Single line of text from the Data type dropdown menu, select Text from the Format menu, and then select Save. Notice that you're not making this column required. You make it a required column in the business process later in the lab.

    Screenshot of the Supplier Order I D pane.