Exercise - Create custom tables

Completed

Contoso Real Estate wants to track two key elements:

  • Real estate property listings

  • Who is scheduled for showings of real estate properties

Follow these steps to create the Real Estate Properties and Showings tables.

Create a solution

The first item that we create is a solution. Solutions are used to group different items such as tables and apps together so they can be transported from one environment to another. It is always considered the best practice to build your items in a solution.

  1. Navigate to https://make.powerapps.com.

  2. Using the navigation on the left, select Solutions.

  3. Select the New Solution button.

  4. In the New Solution screen, select +New Publisher.

  5. Create the New Publisher as follows:

    • Display name: Contoso

    • Name: Contoso

    • Prefix: Contoso

    A screenshot of creating a new publisher.

  6. Select the Save button.

  7. Back on the New Solution, quick create screen, configure as follows:

    • Display name: Contoso Real Estate

    • Name: ContosoRealEstate

    • Publisher: Contoso

    • Set as your preferred solution: Yes

    A screenshot of creating a new solution.

  8. Select the Create button.

Add existing tables

Now that your solution is created, we are going to add some data to it. We are going to start by adding two existing tables, Contact and User. We use those tables later to populate lookup columns.

  1. On the Command Bar, select Add Existing, and from the menu that appears, select Table.

  2. In the Search tables field, enter Contact, and select the Contact table.

  3. In the Search tables field, enter User, and select the User table.

  4. Select the Next button.

  5. Select Include all objects for both the Contact and User tables.

  6. Select the Add button.

Create the Real Estate Property table

Next, we are going to create the Real estate Property table to store the different real estate properties that we sell. The easiest way to create a table is to use Copilot.

  1. On the Command Bar, select the New button from the Menu that appears, select Table > Tables.

  2. On the Choose an option to create tables screen, select Start with Copilot.

    A screenshot of building with copilot.

  3. On the Get Started with Copilot screen, enter the following: “Create a table called Real Estate Properties, The First column should be called Property Name. Include an Asking price column, and address columns. There should be separate columns for Street, City, State, and Postal Code.”

  4. Select the Generate button.

  5. You completed real estate property table should resemble the image:

    A screenshot of newly created table after using copilot.

Important

Even if you enter the same information into Copilot, you might not get the exact same results. If your table looks slightly different, that's okay.

  1. In the copilot pane on the right, enter the following text: “Add a new choice column called Bedrooms. It should include 5 options: 1,2,3,4, and 5”. Select the Send button.

  2. Next, we add another column called bathrooms. In the copilot pane on the right, enter the following text: “Add a new choice column called bathrooms, it should have 9 options: 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, and 5.” Select the Send button.

  3. Your new Real Estate Properties table should resemble the image:

    A screenshot of completed table with bedroom and bathroom fields.

  4. Select the Save and exit button.

Create the Showings table

In addition to using Copilot to create tables, you can also define the tables and columns yourself. This time we create the table using the advanced properties method. This method shows you what happens behind the scenes when you create a table with Copilot.

  1. In your Contoso Real Estate solution, select the New button. From the menu that appears, select Table > Table (advanced properties)

  2. Select the Properties (gear icon) button.

  3. Change the Display Name to Showing.

  4. Select Enable attachments (Including notes and files)

  5. Select the Save button.

  6. After your new table is created, under Schema, select Columns.

  7. On the Command bar, select the + New Column button.

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

    • Display name: Showing Date

    • Data type: Date and Time – Date Only

Let's add another column in the columns and data pane. Select the +(New column) button to add a new column.

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

    • Display name: Shown to

    • Data type: Lookup

    • Related Table: Contact

  2. Select the + (New column) button to add a new column.

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

    • Display name: Shown by

    • Data type: Lookup

    • Related Table: User

  4. Select the + (New column) button to add a new column.

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

    • Display name: Property Shown

    • Data type: Lookup

    • Related Table: Real Estate Property

  6. Select the + (New column) button to add a new column.

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

    • Display name: Comments

    • Data type: Multiple lines of text

  8. Select the + (New column) button to add a new column.

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

    • Display name: Level of Interest

    • Data type: Choice

  10. Create the choice values:

    • Selecting multiple choices is allowed.

    • Select No under Synch with global choice?

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

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

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

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

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

    • Select Save.

    Screenshot of Level of Interest column.

  11. Select the + (New column) button to add a new column.

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

    • Display name: Client

    • Data type: Lookup

    • Related Table: Contact

  13. Your showing table should resemble this screenshot:

    Screenshot of Showing table.

Great! You now created the two tables needed for Contoso Real Estate's model-driven app.