Create Many-to-many table relationships in Microsoft Dataverse using Power Apps portal

The Power Apps portal provides an easy way to create and edit Many-to-many table relationships for Dataverse.

The portal enables configuring the most common options, but certain options can only be set using solution explorer. More information:

View Many-to-many table relationships

  1. From the Power Apps portal, select either Model-driven or Canvas design mode.
  2. Select Data > Tables and select the table that has the relationships you want to view.
  3. With the Relationships tab selected, you can select the following views:
View Description
All Shows all the relationships for the table
Custom Shows only custom relationships for the table
Default Shows only the standard relationships for the table

Account table relationships.

Many-to-many relationships will have a Relationship type of Many-to-many.

Note

The table you view may have no Many-to-many relationships.

Create relationships

While viewing table relationships, in the command bar, select Add relationship and choose Many-to-many.

Select type of relationship.

In the Many-to-many panel, choose the table you want related to the current table.

Many-to-many panel with account table selected.

Select More Options to view the Relationship Name and Relationship table name columns.

Many-to-many panel with More Options selected.

The values for these columns are generated for you based on the tables chosen.

Note

If you create more than one Many-to-many relationship with the same two tables, you will need to edit the generated Relationship Name and Relationship table name columns so that they will be unique.

Select OK to close the Many-to-many panel. The relationship will be created when you save changes to the table.

Once saved, there's nothing that can be changed using Power Apps portal. To edit properties of the relationship for model-driven apps use solution explorer.

Create a many-to-many relationship with the same table (self-referential relationship)

There may be times when you need to create a many-to-many relationship that references the same table. For example, account records may have multiple parent account records. However, if the self-referential relationship doesn’t have custom labels configured, distinguishing the two related record types that appear in the app won’t be apparent to users. This is because the related records appear twice in the app by using the same table name. To create a self-referential relationship, use custom labels.

  1. Create a new custom table. In this example, the table is named Custom table.

  2. Open the classic solution explorer, open the custom table, and in the N:N Relationships section create a new Many-to-Many Relationship.

  3. Complete the relationship definition as follows. Make sure to add custom labels to both the current and the other table’s relationship:

    Current table section

    • Display option: Use Custom Label
    • Custom Label: Primary Custom Table Relationship

    Other table section

    • Entity Name: Custom table
    • Display Option: Use Custom Label
    • Custom Label: Secondary Custom Table Relationship Self-referential table relationship configuration.
  4. Save the relationship, and then publish the customization.

Because the related record types use the custom labels defined for the self-referential relationship instead of the table name, users running the app can distinguish between the two related record types that exist.

App with related records using relationship custom labels.

Delete relationships

While viewing table relationships, select the relationship you want to delete.

Delete table relationship.

You can use the Delete relationship command from the command bar or from the row context menu when you select the ellipses (...).

Deleting the Many-to-Many relationship will delete the relationship table created. All data connecting tables using the relationship will be lost.

See also

Create N:N (many-to-many) table relationships
Create N:N (many-to-many) table relationships in Dataverse using solution explorer