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?
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.
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?
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:
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.
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):
whereas if I choose a Time Entry from the list it DOES have a lookup value for Project:
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:
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.
Check out the on demand sessions that are available now!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.
Features releasing from October 2020 through March 2021