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 Opportunity 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 select Table (advanced properties).

    Screenshot of creating a new table in Dataverse.

  5. Enter Opportunity for Display name.

Task 1.2 - Primary column

  1. Select Primary column tab next to Properties tab.

    Screenshot of primary column.

  2. Enter Opportunity Subject for Display name.

  3. Select Save.

Task 1.3 - Add columns

  1. In the Opportunity 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 Opportunity 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: Customer
    2. Data type: Single line of text
    3. Required: Business required
  6. Select Save.

  7. In the Opportunity columns and data pane, select + to add a new column.

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

    1. Display name: Address
    2. Data type: Single line of text
    3. Required: Optional
  9. Expand Advanced options and enter 200 for Maximum character count.

  10. Select Save.

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

    1. Display name: Estimated Close Date
    2. Data type: Date and time
    3. Format: Date only
    4. Required: Optional
  12. Select Save.

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

    1. Display name: Amount
    2. Data type: Currency
    3. Required: Optional
  14. Select Save.

  15. In the Opportunity 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
  16. Select Save.

Task 1.4 - Add choice column

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

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

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

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

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

  6. Select New 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 Opportunity.

  5. In the Opportunity 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 opportunity 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 Opportunity.

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

  6. Select + New row and enter or select the following values:

    1. Opportunity Subject: 100 Widgets
    2. Owner Name: MOD Administrator
    3. Customer: Adventure Works
    4. Estimated Close Date: Pick a date in the previous month
    5. Amount: 10,000
    6. Status: Closed
  7. Select Insert row below and enter or select the following values:

    1. Opportunity Subject: Key customer
    2. Owner Name: MOD Administrator
    3. Customer: Fabrikam
    4. Estimated Close Date: Pick a future date in the current month
    5. Status: New
    6. Amount: 50,000
  8. Select Insert row below and enter or select the following values:

    1. Opportunity Subject: New customer
    2. Owner Name: MOD Administrator
    3. Customer: Coho Winery
    4. Estimated Close Date: Pick a future date in the next month
    5. Amount: 25,000
    6. Status: New
  9. Select Insert row below and enter or select the following values:

    1. Opportunity Subject: Repeat customer
    2. Owner Name: MOD Administrator
    3. Customer: Fourth Coffee
    4. Estimated Close Date: Pick a future date in the next month
    5. Amount: 15,000
    6. Status: Open

    Screenshot of edit data pane.

  10. Close the tab.