cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AccuFloDev
Advocate II
Advocate II

LookUp function returns null relationship columns when using Entity GUID as Condition (CDS for Apps)

Hello again PowerApps Community,

 

I am in the process of Migrating an app from the old CDS 1.0 to the new CDS-for-apps, aka CDS 2.0 (The Environment Instance Version is 9.1.0.267). While re-connecting some old forms in the app, I've run into an issue with the LookUp function in PowerApps:   It does not appear to load the relationship columns when using the Entity's unique GUID as a condition.

 

For example, I have a table of Jobs which contain a relationship column to a Customer.
I want to query a single record by using the unique GUID for that record.  I can do this the LookUp, or Filter functions:

//Returns Entity but all Relationship columns are Blank.
LookUp('Jobs',  jobid = "[GUID STRING]") 

//These methods return the same Entity with proper relationship column data.
First(Filter('Jobs', jobid = "[GUID STRING]") 
First(Collect('Jobs', jobid = "[GUID STRING]")


Is anyone else able to confirm this behaviour on their end?  
This appears to be a bug unless I missed an important detail about the LookUp function...

4 REPLIES 4
Anonymous
Not applicable

Just checking where are you getting your guid from and can you see the guid in the data?

 

Also do you have any experimental controls on like the GUID types control.


@Anonymous wrote:

Just checking where are you getting your guid from and can you see the guid in the data?

I'm getting the GUID from Expanding the lookup column (e.g.  ThisItem.LookUpColumn.LookupIdColumn )
This is why it's causing issues because the lookup column is often NULL, especially if there's multiple lookups columns on an entity.   

Also do you have any experimental controls on like the GUID types control.


The GUID Data types option on but is off.  However I do have the experimental CDS for Apps turned on (for attachments to entities).

I'm still having issues with this, even using the First-Filter method:  One entity has 6 lookups and only 2 columns are being populated with data using either LookUp or Filter. 

AccuFloDev
Advocate II
Advocate II

Update - I'm noticing similar issues using galleries.

If I try to gather an entity using Collect, one or more lookup columns often (But not always?) comes back empty. When I compare the data to what is exported into excel, there clearly should be data in the lookup column.

 

This issue continues through multiple refresh attempts. If however I connect a Gallery directly to the data source, it grabs all columns just fine. This however is not a best practice, especially if I'm going to have to make this app offline-capable in the future.

 

Any updates from Microsoft on this?


@AccuFloDev wrote:

Update - I'm noticing similar issues using galleries.

If I try to gather an entity using Collect, one or more lookup columns often (But not always?) comes back empty. When I compare the data to what is exported into excel, there clearly should be data in the lookup column.

 

This issue continues through multiple refresh attempts. If however I connect a Gallery directly to the data source, it grabs all columns just fine. This however is not a best practice, especially if I'm going to have to make this app offline-capable in the future.

 

Any updates from Microsoft on this?


According to MS, the Collect and ClearCollect issue is known behaviour for CDS connector v2 where it won't always get the lookup fields.  Smiley Frustrated

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,019)