cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

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

Hello.


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.

usinggallery.png

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: 

 

Gallery2.AllItems.User

 

 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?

3 REPLIES 3
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?

 

Regards,

Mona

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.

galleryfullname.png

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')

emptyvaluesman.png

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:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona

 

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

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (16,363)