Create a custom table that has components in Power Apps

With Power Apps, you tailor your app to closely fit your organization’s industry, nomenclature, and unique business processes. Power Apps app development includes adding standard "out-of-box" tables or creating custom tables. A table defines the information you want to track in the form of records, which typically include properties such as company name, location, products, email, and phone.

In this article you create a table and then add or customize key components such as columns, relationships, views, and forms. You learn how to:

  • Create a custom table.
  • Add custom columns to your table.
  • Add a table relationship.
  • Customize a view.
  • Customize a form.

The article will follow the company, Contoso, which is a pet grooming business that grooms dogs and cats. Contoso needs an app for client and pet tracking that can be used by employees across a variety of devices.

Prerequisites

Sign in to Power Apps. If you don’t already have a Power Apps account, select the Get started free link from powerapps.com.

Create a custom table

  1. On the left navigation pane select Tables. If the item isn’t in the side panel pane, select …More and then select the item you want.

  2. On the command bar select New table > Set advanced properties.

  3. In the right pane, enter the following values, and then select Create.

    • Display name: Pet
    • Description: Custom table to track pet services

Add and customize columns

  1. Open the Pet table that was created in the previous section.

  2. Select Columns, and select the Pet column.

  3. In the right pane make the following changes to the Display name column:

    • Change the Display name from Pet to Pet Name.

    • Make sure Searchable is selected.

      Change primary column.

  4. Select Done.

  5. On the Columns area on the table designer toolbar select Add column. On the Column properties pane, enter or select the following values and options.

    • Display name. Species
    • Data type. Choice
    • Choice. New choice
  6. Select View more, and then select Local choice.

  7. Create the choice:

    a. Replace New option with Dog.

    b. Select Add new item.

    c. Replace New option with Cat.

    d. Select Done.

    New choice .

  8. Make sure Searchable is selected, and then select Done.

  9. On the table designer toolbar select Add column. On the Column properties pane, enter or select the following values:

    • Display name. Breed
    • Data type. Text
  10. Make sure Searchable is selected, and then select Done.

  11. On the table designer toolbar select Add column.

  12. On the Column properties pane, enter or select the following values, and then select Done.

    • Display name. Appointment date
    • Data type. Date and time

Add a relationship

  1. Select the Relationships area. Then, on the table designer toolbar, select Add relationship, and then select Many-to-one.

  2. On the right pane, in the Related list select Account.

  3. Select Done.

  4. Select Save table.

Notice that when you add a many-to-one relationship, an Account column with the data type Lookup is automatically added to your list of columns in the Columns area.

Customize a view

  1. Select the Views area, and then open the Active Pets view. If you don't see the Active Pets view, change the filter on the command bar from Default to All.

  2. On the view designer Table columns left pane, select the following columns to add them to the view.

    • Account
    • Appointment date
    • Breed
    • Species
  3. On the view designer canvas, select the Created On column, and then select Remove.

  4. To arrange the columns, on the view designer canvas, select the column you want to move and then use Move Left or Move Right. Your view should look like this.

    Active pets view.

  5. On the view designer toolbar, select Save, and then select Publish.

Model-driven apps only: Customize the main form

Skip this step if you only want to use the Pet table in a canvas app.

  1. Select Back to close the view designer and return to Power Apps.

  2. On the left navigation pane, select Tables. If the item isn’t in the side panel pane, select …More and then select the item you want.

  3. Select Pet.

  4. In the Pet table, select the Forms area, and then select Information next to the Main form type to open the form designer.

    Edit main form.

  5. On the form editor, select the Table columns on the left pane. Then, drag and drop the Species, Breed, Appointment date, and Account columns located on the pane on to the General section of the form designer canvas until the form looks like this.

    Select columns for main form.

  6. Select Save.

  7. Select Publish.

  8. Select Back to return to Power Apps.

Add the custom table to an app

Now your table is ready to be used to build either a canvas or model-driven app.

Next steps

In this topic, you learned how to create a table that can be used to create a useful app.