Lab - Create a new choice or modify an existing choice
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.
- Select Launch VM mode in this unit.
- 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.
- 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:
Sign into Power Apps. If using the virtual environment, skip to step 2.
On the left pane, expand Data/Dataverse and select Choices.
Select New choice on the menu at the top of the list.
Enter a PC Type for the Display name.
Add the following items to the choice:
Laptop
Desktop
Tablet
Server
Note
You can assign a unique numeric value by adjusting the value field beside the choice entry.
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.
Select Dataverse/Data in the panel on the left-hand side of the Power Apps Portal to expand the available choices.
Select Tables under the Data options on the left-hand side of the portal.
Select New table in the menu at the top of the list of tables.
Enter the following for Display name: PC Manufacturers
Select Save.
Add the choice to the custom table
Select Data/Dataverse on the panel on the left-hand side of the Power Apps Portal to expand the available choices.
Select Tables under the Data/Dataverse option on the left-hand side of the portal.
Select the new custom table PC Manufacturers in the list of tables. This will open the list of columns in the table.
Select the New column button on the menu below the columns and data section.
Enter Type of PC as the name of the new column.
Select Choice for the data type.
Scroll down to the Sync this choice with option and select PC Type from the list of choices.
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:
Select Data/Dataverse on the panel on the left-hand side of the Power Apps Portal to expand the available choices.
Select Tables under the Data/Dataverse option on the left-hand side of the portal.
Select the new custom entity PC Manufacturers in the list of tables. This will open the list of columns in the entity.
Select the New column button on the menu above the list of columns.
Enter *Screen Size in the Display name field.
Enter choice in the Data type field. Locate the Sync this choice with field and select New choice.
Type Screen Size in the Display name field.
Type 14 Inch, 17 Inch, 21 Inch, and None in the items and then select the Save button.
Type 14 inch in the default value field and select the Save button.
Select the Save table button.
If you need to modify an existing choice, follow these steps:
Sign into Power Apps.
On the left pane, expand Data/Dataverse and select Choices.
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.
Select the Save button to save changes.
Need help? See our troubleshooting guide or provide specific feedback by reporting an issue.