cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Serviced2000
Helper III
Helper III

Canvas App Relationships

Hi Everyone,

 

I'm really struggling with pulling data across a relationship in a canvas app and am hoping someone can help me. 

 

I have two tables (at least just the two right now) - Approval and Placement. In the Approval Field is a columns labelled 'Regarding' which appears to have multiple relationships across multiple tables - including the Placement table. Following a video from PowerApps911 here: 

 

Canvas Apps: CDS Gallery Items, Related Entities, Formatting Currency. - YouTube

 

My first thought was to look for the field in the field list, but the 'Regarding' field isn't list and nor are any of the fields in the related table. After doing some digging in the community I came across a similar post that led me here: 

 

Understand record references and polymorphic lookups in canvas apps - Power Apps | Microsoft Docs

 

And looking at the number of tables that are related via the 'Regarding' column it looked like polymorphic lookups might be the way to go, but if I add the formula : 

 

If( IsType( ThisItem.Regarding, Placements ),
"Placement: " & AsType( ThisItem.Regarding, Placements ).'PlacementID', "Not Linked")

 

All the items in my gallery are listed as 'Not Linked' so I must be missing something. 

 

Can anyone help point me in the right direction for this? I'll need to traverse relationships across quite a few tables so if I can't get past this point I'm pretty stuck.

 

Thanks in advance!

1 REPLY 1
PaulD1
Super User
Super User

You might also want to try posting to the Dataverse subsection as well (Microsoft Dataverse - Power Platform Community).

I believe I am in a minority but I have always thought that polymorphic relationships (I think now also called multi-table relationships) are a terrible idea that go against normalisation principles and create much unnecessary confusion for limited/questionable benefit. My understanding is that they are not well supported in canvas apps but as MS has recently doubled-down on them, there may be some new features in canvas apps to provide additional support either recently added or in the pipeline.

Last time I had to deal with these I seem to recall that the D365 team just put in redundant relationships / repeated fields across the entities to give us something we could run delegable filters on.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,778)