Exercise - Create custom tables

Completed

In this unit, you learn how to:

  • Create a Dataverse solution

  • Create a custom table in Dataverse

Here, you'll create the table and columns needed to store the booking request information.

Create a solution

Follow these steps to create a new solution.

  1. Navigate to the Power Apps maker portal.

  2. Select your Environment.

  3. In the left navigation pane, select Solutions, and select + New solution

    Screenshot of solutions in the Maker portal.

  4. Enter Bookings for Display name.

  5. Select + New publisher.

  6. Enter Contoso for Display name.

  7. Enter contoso for Name.

  8. Enter contoso for Prefix.

  9. Select Save.

  10. Select the Contoso (contoso) publisher.

  11. Select Create.

  12. Select Back to solutions in the top-left of the screen.

Set the preferred solution

All objects are automatically added to the preferred solution.

  1. Under Solutions in the Maker portal, select Manage for Set your preferred solution.

  2. Select Bookings (contoso) and select Apply.

    Screenshot of preferred solution in the Maker portal.

Create the Real Estate Properties custom table

Follow these steps to create a new custom table in Dataverse for Real Estate Properties.

  1. In the left navigation pane, select Tables, then select + New table from the top menu on the Tables screen.

  2. From the + New table menu, select Table (advanced properties).

  3. In the New table pane that opens, set the Display name to Real Estate Property.

  4. Select the Primary column tab at the top of the New table pane and set the Display name for the Primary column to Property Name.

  5. Select save at the bottom of the pane, and after saving, you'll be redirected to the Real Estate Property table properties.

  6. Select + New from the top menu and choose Column under Schema to create a new table column.

  7. In the New column pane, enter the following values, and then select Save:

    1. Display name: Asking Price

    2. Data type: Currency

  8. Let's add another column in the columns and data pane; again, select the + New button to add a new column.

  9. In the New column pane, enter the following values, and then select Save:

    1. Display name: Street

    2. Data type: Single line of text (this value is the default)

  10. Add a column in the columns and data pane; select the + New button to add a new column.

  11. In the New column pane, enter the following values, and then select Save:

    1. Display name: City

    2. Data type: Single line of text (this value is the default)

  12. Add another column to the Real Estate Property table.

  13. In the New column pane, enter the following values:

    1. Display name: Bedrooms

    2. Data type: Choice

  14. Select + New choice under Sync this choice with to create a new choice list:

    1. In the New choice pane that opens, set the Display name to Bedrooms.

    2. Under Choices you see two entry fields titled Label and Value. Enter 1 for the first Label. Power Apps assigns a Value automatically but you can change the value to 1 as well.

    3. Select + New choice and make 2 the new entry for Label and 2 for Value.

    4. Select + New choice and make 3 the new entry for Label and 3 for Value.

    5. Select + New choice and make 4 the new entry for Label and 4 for Value.

    6. Select + New choice and make 5 the new entry for Label and 5 for Value.

    7. Select Save to create the choice list.

  15. After saving the choice list, select the drop-down under Sync this choice with and choose the Bedrooms choice list, then Save the column.

  16. Select the + New button to add a new column.

  17. In the New column pane, enter the following values:

    1. Display name: Bathrooms

    2. Data type: Choice

  18. Under Sync with global choice? select No to create a local choice list specifically for this column and add the following choices:

    1. Under Choices you see two entry fields titled Label and Value. Enter 1 under the label. Power Apps assigns a value automatically but you can change it to 1.

    2. Select + New choice and make 2 the new entry for Label and 2 for Value.

    3. Select + New choice and make 3 the new entry for Label and 3 for Value.

    4. Select + New choice and make 4 the new entry for Label and 4 for Value.

    5. Select + New choice and make 5 the new entry for Label and 5 for Value.

    6. Select Save.

  19. Add another column by selecting the + New button again.

  20. In the New column pane, enter the following values, and then select Save:

    1. Display name: Client

    2. Data type: Lookup

    3. Related Table: Contact

  21. At the bottom of the pane, select Create.

  22. Under Real Estate Property columns and data, enter the following test data to build a table record:

    1. Property Name: 1100 High Villas

    2. Asking Price: 250,000

    3. Bathrooms: 3

    4. Bedrooms: 2

    5. City: Redmond

    6. Street: Main Avenue

    7. Client: Select any contact. If your Contact table has no entries, there will not be a client to select.

Create the Bookings table

Follow these steps to create a new custom table in Dataverse for Real Estate Property Bookings.

  1. In the left navigation pane, select Tables, select + New table, and then select Table (advanced properties).

  2. Name the table Booking Request.

  3. Select the Primary column tab, name it Booking Name, then select Save to create the table.

  4. Add a column to the table by selecting the + New button.

  5. In the New column pane, enter the following values, and then select Save:

    1. Display name: Property

    2. Data type: Lookup

    3. Related Table: Real Estate Property

  6. Add another column by selecting the + New button again.

  7. In the New column pane, enter the following values, and then select Save:

    1. Display name: Viewer Name

    2. Data type: Single line of text

  8. Add another column by selecting the + New button again.

  9. In the New column pane, enter the following values, and then select Save:

    1. Display name: Viewer Email

    2. Data type: Single line of text

    3. Format: Email

  10. Add another column by selecting the + New button again.

  11. In the New column pane, enter the following values, and then select Save:

    1. Display name: Booking Date

    2. Data type: Date and time

  12. Add another column by selecting the + New button again.

  13. In the New column pane, enter the following values, and then select Save:

    1. Display name: Notes

    2. Data type: Multiple lines of text

  14. Now add one last column to the Booking Request table.

  15. In the New column pane, enter the following values:

    1. Display name: Decision

    2. Data type: Choice

  16. Select No under Sync with a global choice? to create a local choice list:

    1. Under Choices you see two entry fields titled Label and Value. Enter Undecided under the label. Power Apps assigns a value automatically, but you can change it to 1.

    2. Select + New choice and make Accepted the new entry for Label and 2 for Value.

    3. Select + New choice and make Declined the new entry for Label and 3 for Value.

    4. Designate Undecided as the Default choice.

    5. Select Save.

You should now have all tables and their appropriate columns that will be used in the next units.