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

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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,038)