cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mattybear
Level: Power Up

CDS PowerApp - Showing Field from Related Entity

I have a simple setup in the CDS.

Equipment has a 1:N relationship with Repair.

Equipment can have many Repairs.  Repair must have Equipment.

 

I want to show a list of Repairs within a PowerApp gallery list and then allow the user to click into for more information (such as description, progress, etc).

 

I'm struggling with something that should be simple - In the list of Repairs, showing the Name of the Equipment (referred to as Fleet Number in my example).

 

The first likely thing to do would be to follow the syntax helper toward this:

 

 

ThisItem.Equipment.'Fleet Number'

 

 

 

Other examples in this forum where people seem to have a 50% chance of success also failed.  This includes the First(Filter()) method and LookUp method.  The syntax gets to a point where it is accepted, however, no data is appearing.

 

 

First(Filter([@Equipment], Equipment = ThisItem.Equipment.Equipment)).'Fleet Number'

 

 

 

I know that I can access that Equipment entity because when I put a label on the form with the following, "AA100" appears which is the Fleet Number of the first record in Equipment

 

 

First(Equipment).'Fleet Number'

 

 

 

Any help would be appreciated - losing faith in CDS PowerApps very quickly after being blocked on something that should be VERY simple.

1 REPLY 1
v-siky-msft
Level 10

Re: CDS PowerApp - Showing Field from Related Entity

Hi @mattybear,

 

Have your ever bound the equipment records to Repair entity?

The formula you used is right. The cause of this issue seems to be that no record is assigned to the lookup field "equipment". You can go to PowerApps web- Data - Entity -Data, and check if there is any data in the equipment field.

If no data, you can use EditForm to submit it. Beside that, Patch function and Relate function can all do it.

Patch(Repair,First(Repair),{Equipment:<the record of Equipment entity>})
Relate( First( Equipment ).Repair, First( Repair ) )

For more reference, please refer to these docs: Relate function ,Patch function .

Best regards,

Sik

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,284)