Showing results for 
Search instead for 
Did you mean: 
Post Patron
Post Patron

Using a lookup field through a Gallery only works when I use First, how to make it get all items


I have a combo box that uses "Users" as its Items.

The issue I'm having is I want to use a different entity for it's DefaultSelectedItems, but this entity has a lookup field to Users. I couldn't get it to work using the Entity itself so I tried to use a Gallery. The issue now is it will only work if I use First() like so.


It actually returns the correct full name from Users through the lookup field. The issue is it's only the first one, I need to get them all. I've tried using: 




 But this just ends up with all the data being empty. 

Is there anyway where you can have Users for Items in a ComboBox and then use a different Entity in it's DefaultSelectedItems but have that Entity use it's lookup field to Users to work?

Community Support
Community Support

Hi @Mgodby ,


What is the lookup field name in this entity? Is it User too? Is this entity the data source of Gallery2?




Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The data source for the gallery is a "Copy To" entity that has a lookup field to User. The combo box's Item is "Users" but we are trying to use the lookup field to User in the "Copy To" entity to set the DeafaultSelectedItems for that combo box. 


It seems like when we use the lookup fields without First() they're empty, even though we know they have data due to the gallery.


Like if I use Gallery2. AllItems.'The User' (It's 'The User' now because someone said I should try renaming the lookup field to something other than 'User')


But you can see that it does return two rows (the correct number) but they have no data. This is the main issue with the problem I think, the fact that the lookup field returns no data for some reason. But it works in the gallery and you can see their names there. Is this just a limitation with powerapps?

Hi @Mgodby ,


If you use one entity as the data source of a combo box, then you cannot have a 2nd one in the DefaultSelectedItems property. This seems to be a limitation for CDS entities data sources, since I also tested with 2 SharePoint lists, and the 2nd list works with the DefaultSelectedItems property.


If you need this, please consider to submit an idea in below forum:





Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (68,771)