When I Collect from CDS Data Source into Collection in canvas app designer, the lookup fields are not being populated even though I can see the lookup values when I bind the data source to the data table.
This is the sample formula that I used
ClearCollect(ContactCollection, ShowColumns(Contacts, "fullname", "createdby"))
And this is the output collection without any data in the lookup column.
Sometimes, the lookup columns show up and most of the times, they do not.
Is that a bug? And is there any fix/workaround solution for it?
Solved! Go to Solution.
If I need to display data from a related entity, I usually do a lookup.
Entity1 is parent
Entity2 is child
Let’s say Gallery1 lists Entity2 child records, and I have some controls outside the gallery that need to display information from the selected record. The information might need to be columns from the Entity2 record as well as its parent Entity1 record.
On select of the Gallery, I would set a variable for the selected record. Something like this:
Set(varRecord, Lookup([@Entity2], Entity2Id = Gallery1.Selected.Entity2Id)
Set(varParentRecord, Lookup([@Entity1], Entity1Id = varRecord.Entity2FieldName.Entity1Id)
That gives me 2 record variables to work with.
I usually also wrap those variable lookups with ShowColumns so that I can get the specific fields for the record that I want to work with. So, if there is a label or other control that needs to reference the column, I just make sure it’s included in the ShowColumns formula.
Yes this definitely is a bug
I have observed the same thing as well
Most of the times I need to connect to the Lookup entity as well and then query to fetch the associated data
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Hi @LinnZawWin ，
Yes, I also face the same issue.
Sometimes the table logo is displayed, sometimes it is empty, sometimes it can be invoked, sometimes it cannot reference the value.
It is really werid.
I ready to post this issue to Microsoft product team. If this issue is solved, I would reply here.
I have tried this and it works sometimes but it is inconsistent. I am still searching for a proper, production acceptable, solution.
Using the lookup column somewhere in the app did solve the problem.
I've documented down that workaround solution in my blog post.
@JT_Corrin if you're still having a problem, can you try disabling the "Explicit column selection" setting?
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.