cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Level: Powered On

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 Team
Community Support Team

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

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.
Mgodby
Level: Powered On

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

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?

Community Support Team
Community Support Team

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

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,691)