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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,145)