Lab - Create a new choice or modify an existing choice

Completed

Read this first - before you start the lab!

Important

For this lab, do not sign in with your credentials. Use the following steps to sign in to your lab environment with the correct credentials.

  1. Select Launch VM mode in this unit.
  2. You'll see a PowerShell window and a Windows Command window appear. After about two to three minutes, they'll close, and Power Apps will open automatically. Wait for the Power Apps home screen.
  3. To see the lab instructions, select the Instructions tab on the lab side bar.

You can now begin your work on this lab.

Create a new custom choice

You might want to make a new custom choice to use across many entities in Microsoft Dataverse. You can create a choice in two ways: by creating a choice when you define a new field within a table, or by creating a choice by using the choice functionality within the Power Apps portal.

To create a new custom choice by using the choice functionality in the Power Apps Portal, follow these steps:

  1. Sign into Power Apps. If using the virtual environment, skip to step 2.

  2. On the left pane, expand Data/Dataverse and select Choices.

  3. Select New choice on the menu at the top of the list.

  4. Enter a PC Type for the Display name.

  5. Add the following items to the choice:

    Laptop

    Desktop

    Tablet

    Server Dialog showing choice named PC Type with Laptop, Desktop, Tablet, and Server added.

    Note

    You can assign a unique numeric value by adjusting the value field beside the choice entry.

  6. Select the Save button.

The choice PC Type is now available to use with any field in any entity within the environment. To use the new choice, follow the next steps.

Tip

It might take a few minutes for the new choice to appear in the list of available choices.

Create a new custom table

If you have not created the custom table PC Manufacturers earlier in this learning path, complete the following steps.

  1. Select Dataverse/Data in the panel on the left-hand side of the Power Apps Portal to expand the available choices.

  2. Select Tables under the Data options on the left-hand side of the portal.

  3. Select New table in the menu at the top of the list of tables.

  4. Enter the following for Display name: PC Manufacturers

  5. Select Save.

    Screenshot of New table values with Create button.

Add the choice to the custom table

  1. Select Data/Dataverse on the panel on the left-hand side of the Power Apps Portal to expand the available choices.

  2. Select Tables under the Data/Dataverse option on the left-hand side of the portal.

  3. Select the new custom table PC Manufacturers in the list of tables. This will open the list of columns in the table.

  4. Select the New column button on the menu below the columns and data section.

    Screenshot of the new column button.

  5. Enter Type of PC as the name of the new column.

  6. Select Choice for the data type.

  7. Scroll down to the Sync this choice with option and select PC Type from the list of choices.

  8. Select the Save button.

You can also define a choice as you add a new field, without creating a choice in the portal. The choice that you add while defining a field can also be used with any field of type Choice in any table within the environment.

Define a choice when adding new columns

If you would rather define a choice as you add new columns to a table, follow these steps:

  1. Select Data/Dataverse on the panel on the left-hand side of the Power Apps Portal to expand the available choices.

  2. Select Tables under the Data/Dataverse option on the left-hand side of the portal.

  3. Select the new custom entity PC Manufacturers in the list of tables. This will open the list of columns in the entity.

  4. Select the New column button on the menu above the list of columns.

  5. Enter Screen Size Field in the Display name field.

  6. Enter choice in the Data type field. Locate the Sync this choice with field and select New choice.

  7. Type Screen Size in the Display name field.

  8. Type 14 Inch, 17 Inch, 21 Inch, and None in the items and then select the Save button.

    choice dialog with the name set to Screen Size with 14 inch, 17 inch, 21 inch, and None options added.

  9. Type 14 inch in the default value field and select the Save button.

  10. Select the Save table button.

    choice field dialog with the name set to ScreenSizeField, Data type set to choice, choice set to Screen Size, and Default value set to 14 inch.

If you need to modify an existing choice, follow these steps:

  1. Sign into Power Apps.

  2. On the left pane, expand Data/Dataverse and select Choices.

  3. Select the Choice that you want to modify.

    a. Add a new entry by selecting the Add new choice button.

    b. You can delete an item by selecting the trashcan.

    c. You can add additional properties by selecting the settings icon next to the entry.

  4. Select the Save button to save changes.