cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OctavioDlg
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
v-siky-msft
Community Support
Community Support

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
WarrenBelz
Super User III
Super User III

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.

 

v-siky-msft
Community Support
Community Support

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

Awesome!

Thanks

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (29,084)