cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Cant display/access related contact record in DataTable with CDS

Hello,

 

I have two collections that I create on the OnVisible property of the screen, one storing a contact record and another an account record:
Creation of  CollectionsCreation of Collections

 

I populate two different DataTables with these collections, however Im not able to display the primarycontactid or any other lookup field:
Main ScreenMain Screen

This is how I set the data source to each DataTable:

 

Contacts

ContactsContacts

 

Accounts

AccountsAccounts

 

The account and contact record are related, but not sure why I cant see data of the contact record in the Account DataTable:

SS05.png

 

Anyone has faced a similar issue?

 

Thanks!

Octavio

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Cant display/access related contact record in DataTable with CDS

Hi @OctavioDlg ,

 

I can reproduce your issue and just find the workaround. This may be a connection issue between two entity, please try to use AddColumns function to save a Value of lookup field to a new Column, this process will trigger a call to the related entity, and then the LookUp field can be shown properly.

Set Items property of Table as below:

AddColumns(Filter(Accounts,Account=GUID("f754e2ed-beb0-e911-a9c8-0022480081c3")),"Column1",'Primary Contact'.'Full Name')

Annotation 2020-03-20 165726.png

Hope this helps.

Sik

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Cant display/access related contact record in DataTable with CDS

Hi @OctavioDlg 

 

Your syntax looks correct.

I know this is obvious, but have you checked that the record you refer to has data in that field?

 

ClearCollect(
   colContacts,
   Filter(
      Contacts,
      Contact = GUID("25al7064-lae7-e611-80f4-e0071b661f01M")
   )
); 
ClearCollect(
   colAccounts,
   Filter(
      Accounts,
      Account = GUID("d96b3f4b-lbe7-e611-8101-e0071b6af231M")
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Community Support
Community Support

Re: Cant display/access related contact record in DataTable with CDS

Hi @OctavioDlg ,

 

I can reproduce your issue and just find the workaround. This may be a connection issue between two entity, please try to use AddColumns function to save a Value of lookup field to a new Column, this process will trigger a call to the related entity, and then the LookUp field can be shown properly.

Set Items property of Table as below:

AddColumns(Filter(Accounts,Account=GUID("f754e2ed-beb0-e911-a9c8-0022480081c3")),"Column1",'Primary Contact'.'Full Name')

Annotation 2020-03-20 165726.png

Hope this helps.

Sik

View solution in original post

Highlighted
Frequent Visitor

Re: Cant display/access related contact record in DataTable with CDS

Awesome!

Thanks

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,192)