cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver III
Resolver III

Did Filter behavior change? - lookup values not loading on CDS entities

I have a CDS datasource with a basic table (Expenses).  It has (N:1) relationships to other tables, two of which are: Worker and Project.

I set the Items property of a gallery like this and it loads items as expected:

Items = Filter(Expenses, Worker.Worker = CurrentWorker.Worker, Status = 'Status (Expenses)'.Active)

The OnSelect of the gallery then sets a variable to ThisItem and navigates to the ExpenseDetail screen where I show related values, etc.:

Set(SelectedExpense, ThisItem); Navigate(ExpenseDetail, ScreenTransition.UnCover)

Recently, after navigating to the ExpenseDetail screen I noticed the SelectedExpense no longer has values in the fields of related records such as Project.

I looked at the Expenses data source and when the records are retrieved initially, each row has all of the fields.  The Filter function appears to only bring in properties of the Expense (e.g. Amount, Currency), no related ID's.

 

What am I missing?

4 REPLIES 4
Highlighted
Resolver III
Resolver III

Re: Did Filter behavior change?

I'm seeing now that there is no problem with Filter, however, I am noticing that in some cases columns that hold ID's for related records are not coming back with values.

I think it has to do with the new CDS connector.

Highlighted
Resolver III
Resolver III

Re: Did Filter behavior change?

What I see now is that when the user selects an item from the gallery and it is assigned to a variable, "SelectedExpense", on the next screen there are no relationship values that can be found.  On my ExpenseDetail page, if I type SelectedExpense.Project the evaluation text says "We didn't find any data." even though I know it has a value.

 

Anyone else having issues with the new CDS connector?

Highlighted
Community Support
Community Support

Re: Did Filter behavior change?

Hi @Helpful ,

Could you please share a screenshot more about your issue?

Which PowerApps license do you have for your sign in account?

Is the "Project" a LookUp column in your Expenses Entity?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. If you reference the LookUp field (N:1 relationship) value from the "SelectedExpense" variable, please take a try with the following formula:

SelectedExpense.LookUpField.'Unique Identifier Column'   /* <-- Reference the 'Unique Identifier Column' value of a record in the related Entity through the 'LookUpField' */

If you want to reference other column values from the corresponding record in the related Entity through the "SelectedExpense" variable, please take a try with the following formula:

SelectedExpense.LookUpField.Column1
SelectedExpense.LookUpField.Column2
SelectedExpense.LookUpField.Column3

...

 

In addition, if you want to access CDS connector in PowerApps, you must own old PowerApps Plan 1 (or new PowerApps Per App, PowerApps Per User) license at least for your account, please check if your sign in account has owned proper license.

Note: There is an known issue with LookUp field in CDS Entity. When saving a Entity record including a LookUp field into a variable or a collection, the LookUp field value could not be expanded within "File"->"Variables" panel, but you could reference the column value of the corresponding record in the related Entity through the 'LookUp' field.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resolver III
Resolver III

Re: Did Filter behavior change?

Thanks, @v-xida-msft.  I have a P2 license.

This issue has arisen since turning on the Preview setting "Improve data source experience and Common Data Service views".  This was required to turn on to resolve another CDS issue related to optionsets.

Yes, Project is a lookup field.  This app does time & expense and those two entities have a N:1 relationship to the Project entity.

Viewing/Editing Time Entries or Expenses works the same from a user perspective - look at a gallery, choose an item and modify details, patch.

What I am seeing is that after selecting an item from the Expense gallery, there are no lookup values populated on my entity (e.g. Expense.Project.Project does not have a GUID value):Expense_DefaultSelected.png

 

whereas if I choose a Time Entry from the list it DOES have a lookup value for Project:TimeEntry_DefaultSelected.png

 

When I use the monitoring tool to look at initial load requests, it's clear there is a difference - the request for Time Entries includes explicit expand parameters:

  • Time Entries:
https://abc.crm.dynamics.com/api/data/v9.0/msnfpe_timeentries?%24filter=%28msnfpe_TimesheetId%2Fmsnfpe_timesheetid+eq+null%29and%28statecode+eq+0%29&%24orderby=msnfpe_date+asc&%24expand=msnfpe_ProjectActivityId%2Cmsnfpe_CostCenterId%2Cmsnfpe_ProjectId
  • Expenses:
https://abc.crm.dynamics.com/api/data/v9.0/msnfpe_expenses?%24filter=%28msnfpe_WorkerId%2Fmsnfpe_workerid+eq+434ed707-95eb-e911-a839-000d3a34e94e%29and%28statecode+eq+0%29&%24orderby=createdon+asc&%24expand=transactioncurrencyid

The result set in the response for each of these calls includes all record columns and values including ProjectID values, however, when I get back to into the app only the Time Entry entity actually has the Project Lookup value accessible.

Of note, the gallery items for Time Entries has Project, Activity and Cost Center as display values while the Expenses gallery does not (why would this matter here?)

 

Before turing on the preview switch, whenever I referenced records from the datasource they were always complete.  I have seen some posts saying that AddColumns with LookUp is now needed as a workaround, but that doesn't make any sense since the response clearly has the values needed.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,409)