Collect does not collect Lookup value from CDS data source by default – Limitation?
Recently while working on a Power Apps Canvas application, realized that when we create collection from CDS entity as data source, it does not collect Lookup value by default. To work around this issue, we would need to expand Lookup node (same as in Power-BI) either by setting a temporary variable or control.
Let’s see it in action.
- I am collecting data from Question entity data with two columns as below using function – ClearCollect(QuestionsColl, ShowColumns(Questions, “mis_questionid”, “mis_group”))
- mis_questionid – primary key ID
- mis_group – Lookup to Group entity
- At this point my collection looks like below. You can see first column for group is empty
- In order to get data for Group Lookup, I will expand Group Lookup node from Question entity by setting a temporary variable using below formula. Here I am simply reading first Question group name in tempVar variable
Set(tempVar, First(Questions).Group.’Group Name’)
- Now when we collect Question entity data using same above formula, Group lookup would be populated as shown below
Looks like a limitation currently and probably being worked upon but in case you face same issue, can use this work around.
*This post is locked for comments