Practice Lab 2 – Data model

In this lab you will create Dataverse tables and columns.

What you will learn

  • How to create tables and columns in Microsoft Dataverse
  • How to create a relationship with a lookup column

High-level lab steps

  • Create a custom table
  • Add columns to the table
  • Create relationship to the by using a lookup column

Prerequisites

  • Must have completed Lab 0: Validate lab environment

Detailed steps

Exercise 1 – Create custom tables

Task 1.1 - Create the Booking Request table

  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. Select + New table, and choose Table (advanced properties).

    Screenshot of creating a new table in Dataverse.

  5. Enter Booking Request for Display name.

Task 1.2 - Primary column

  1. Select the primary column tab next to the Properties tab

    Screenshot of primary column.

  2. Enter Pet Name for Display name.

  3. Select Save.

Task 1.3 - Add columns

  1. In the Booking Request columns and data pane, select + to add a new column.

    Screenshot of data pane.

  2. In the New column pane, enter or select the following values:

    1. Display name: Owner Name
    2. Data type: Single line of text
    3. Required: Business required

    Screenshot of new column pane.

  3. Select Save.

  4. In the Booking Request columns and data pane, select + to add a new column.

  5. In the New column pane, enter or select the following values:

    1. Display name: Owner Email
    2. Data type: Single line of text
    3. Format: Email
    4. Required: Business required
  6. Select Save.

  7. In the Booking Request columns and data pane, select + and in the New column pane, enter or select the following values:

    1. Display name: Start Date
    2. Data type: Date and time
    3. Required: Business required
  8. Select Save.

  9. In the Booking Request columns and data pane, select + and in the New column pane, enter or select the following values:

    1. Display name: End Date
    2. Data type: Date and time
    3. Required: Optional
  10. Select Save.

  11. In the Booking Request columns and data pane, select + and in the New column pane, enter or select the following values:

    1. Display name: Cost
    2. Data type: Currency
    3. Required: Optional
  12. Select Save.

  13. In the Booking Request columns and data pane, select + and in the New column pane, enter or select the following values:

    1. Display name: Notes
    2. Data type: Multiple lines of text
    3. Format: Text
    4. Required: Optional
  14. Select Save.

Task 1.4 - Add choice column

  1. In the Booking Request columns and data pane, select + and in the New column pane, enter or select the following values:

    1. Display name: Decision
    2. Data type: Choice
    3. Required: Optional
  2. Select No for Sync with global choice?

  3. Enter Undecided for Label and enter 1 for Value.

  4. Select + New choice and enter Accepted for Label and enter 2 for Value.

  5. Select + New choice and enter Declined for Label and enter 3 for Value.

  6. Select Undecided for Default choice.

    Screenshot of new choice column pane.

  7. Select Save.

Exercise 2 – Create relationship

Task 2.1 - Create a lookup column

  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. Select Booking Request.

  5. In the Booking Request columns and data pane, select + and in the New column pane, enter or select the following values:

    1. Display name: Account
    2. Data type: Lookup
    3. Required: Optional
    4. Related table: Account

    Screenshot of new lookup column pane.

  6. Select Save.

Exercise 3 – Data

Task 3.1 - Add booking request records

  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. Select Booking Request.

  5. In the Booking Request columns and data pane, select the drop-down caret next to Edit and select Edit in new tab.

  6. Enter or select the following values:

    1. Pet Name: Fido
    2. Owner Name: MOD Administrator
    3. Owner Email: Use your tenant email
    4. Start Date: Tomorrow
    5. End Date: Pick a date in the following week
    6. Cost: 1,000
    7. Decision: Accepted
  7. Select Insert row below and enter or select the following values:

    1. Pet Name: Tom
    2. Owner Name: MOD Administrator
    3. Owner Email: Use your tenant email
    4. Start Date: Pick a date in the next month
    5. End Date: Pick a date after the start date
    6. Cost: 1,500
    7. Decision: Undecided
  8. Select Insert row below and enter or select the following values:

    1. Pet Name: Jim
    2. Owner Name: MOD Administrator
    3. Owner Email: Use your tenant email
    4. Start Date: Pick a future date in the current month
    5. End Date: Pick a date after the start date
    6. Cost: 250
    7. Decision: Declined
  9. Close the edit data tab.