cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GarryPope
Impactful Individual
Impactful Individual

Canvas app using CDS one-to-many relationships

Hello Power Apps Community,

I hope you can help please with a canvas app issue I'm having.

I have three CDS entities: "Office Space", "Token" and "Booking". They use one-to-many relationships.

I can have one "Office Space" which has many "Tokens", and I can have one "Token" which has many "Bookings".

I have a gallery that's data source is "Booking".

On each record I want to display three pieces of data:

  1. Booking Name. This is from the Booking entity. - So this can be achieved using this expression in the Text property of a label: ThisItem.'Booking Name'
  2. Token Date. This is from the Token entity. Which is the parent of Booking. - So this can be achieved using this expression in the Text property of a label: ThisItem.Token.'Token Date'
  3. Office Space Name. This is from the Office Space entity. Which is the parent of Token. - This is where I'm having trouble, as I am unable to present this value. I believe I need to use a lookup in my expression, but am unable to achieve this.
 
If anyone can help and explain how I look up two entity levels above and show the data that would be great.
Thanks very much,
Garry
1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @GarryPope ,

 

It's not SUPPORTED to reference multiple level of relationship directly by double dot notation. 

First to use LookUp formula to obtain the LookUp field value of Token Entity, and use Dot Notation to reference Office Space Name from the related record.

Please try with this.

LookUp(Tokens,  Token = ThisItem.'LookUpFieldofBookingEntity'.Token, 'LookUpFieldofTokenEntity').'Office Space Name' 
//I assume the Token is the GUID field of Tokens Entity, and then replace that two LookUp field.

 

For example: Reference the Full Name from GrandParent Entity-User.

Snipaste_2020-08-27_16-13-41.png

Hope this helps.

Sik

View solution in original post

2 REPLIES 2
v-siky-msft
Community Support
Community Support

Hi @GarryPope ,

 

It's not SUPPORTED to reference multiple level of relationship directly by double dot notation. 

First to use LookUp formula to obtain the LookUp field value of Token Entity, and use Dot Notation to reference Office Space Name from the related record.

Please try with this.

LookUp(Tokens,  Token = ThisItem.'LookUpFieldofBookingEntity'.Token, 'LookUpFieldofTokenEntity').'Office Space Name' 
//I assume the Token is the GUID field of Tokens Entity, and then replace that two LookUp field.

 

For example: Reference the Full Name from GrandParent Entity-User.

Snipaste_2020-08-27_16-13-41.png

Hope this helps.

Sik

View solution in original post

GarryPope
Impactful Individual
Impactful Individual

Hello @v-siky-msft,

Thanks so much. This is great and worked perfectly. I appreciate your help.

Garry 

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 (4,166)