Power Apps Dataverse: How to Fix ‘Multiple levels of many-to-one relationship expansion aren’t supported’ Error

When encountering the “Multiple levels of many-to-one relationship expansion aren’t supported” message in a canvas app, here are the cause and solution.

スポンサーリンク

Accessing Parent Records

When working with Dataverse in canvas apps, you can access parent table information using the “.” (dot) notation.

For example, with tables structured like this:
When displaying the “Meal History” table in a gallery, you can access parent table information by connecting with “.” (dot) notation like this:
Conceptually, it looks like this:

While this is quite convenient, attempting to access the parent’s parent table results in the error “Multiple levels of many-to-one relationship expansion aren’t supported”.

Multiple Level Expansion

Here’s what the error looks like in practice:
Conceptually, as shown in the diagram below, the error occurs when trying to access the parent table “Owner” information through the parent table “Cat” from the “Meal History” table.

Unfortunately, the “.” notation can only access one level up in the table hierarchy, so let’s explore some workarounds.

Solution 1: Using the LookUp Function

The first solution is to use the LookUp function.

As shown here, you can retrieve information from the “Owner” table by using the LookUp function to first get the record from the “Cat” table, then accessing the “Owner” table through it.
Note: The formula might look confusing because there are two instances of “Cat” here – one for the table name and one for the Primary Key (GUID) column name. (“Cat.Cat” refers to the “Cat” column in the “Cat” table.)

Solution 2: Using Formula Columns

Update 3/27/2024: Since calculated columns are being deprecated and formula columns can reference deeper parent relationships, please refer to using formula columns instead.
Complete Guide to Dataverse Formula Columns: Functions, Operators, and Parent Table References
Since calculated columns are being deprecated, I conducted a detailed investigation into formula columns as their replac...

The following information is outdated and for reference only.

+++ Legacy Article Start +++
Another solution is to add a calculated column to the “Cat” table.

Select “Calculated Column” from add column and click “Save”,
Then retrieve the necessary column from the parent table (in this case, “Name”) using a calculation:
This allows access to the parent’s parent.

While using the LookUp function allows access to all parent information without adding new columns, it generates Dataverse access for each item when displayed in galleries, which might impact performance.

In contrast, using calculated columns requires adding columns for each piece of needed information (and only works with supported data types), but the parent access is handled by Dataverse (presumably), making it less likely to impact performance (presumably).

The choice between these methods depends on the specific situation.

Another option is to add a lookup column to the “Meal History” table referencing the “Owner” table, but this also creates data redundancy, so it’s situation-dependent.

Reference Sites

コメント

Copied title and URL