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

Lookup doesn't return all records from the SharePoint list column

Hi,

 

I have a SharePoint list with columns location and group. In PowerApps UI, I have two dropdowns Location and Group.

 

When user selects a Location, the Group dropdown should automatically show all the values for that particular location.

 

I have written the below code in Group dropdown items property. However it shows only 1 Group (Group 2)

Location"IND- BNG Bangalore" is tied to 2 groups in SharePoint list. Any idea how to get the Group 3 in the dropdown ? PFB screenshots

 

LookUp(Employees,DataCardValue8_1.Selected.Result in 'Location Name:LocationName'.Value).Group

 

1.PNG2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Iantaylor0290 ,

Have you set the two combo boxes' Items like what I recommended?

combo box's Items for LocationName:

Distinct(Locations,LocationName)

combo box's Items for Group:

Distinct(Employees,Group)

Then choose primary text here:

 1013.PNG

 

Best regards,

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

View solution in original post

11 REPLIES 11
Iantaylor0290
Helper I
Helper I

Hi @yashag2255 , All,

 

Could you please help me out on the below lookup issue. Thanks

Hi @v-yutliu-msft 

 

Can please advise me on the below lookup issue

Hi @eka24 ,

 

Can please advise on the below issue ? Thanks

Have you tried;

Distinct (Employee,Group)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

 

My requirement is to filter based on locations.  If I choose Location as IND- BNG Bangalore, Group combobox should be automatically populated with Group 2, Group 3. I used below formula in Items property but somehow the filtering shows blank records. Its getting records but displaying transparent

 

Filter(Employees,DataCardValue8_1.Selected.Result in 'Location Name'.Value).Group

 

Even when i use distinct(employee,group) the combo box is transparent. Records is showing filled with blank space

 

 

1.PNG2.PNG

Can you share the formula on the location dropdown?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

Distinct(Locations,LocationName).Result.

 

Location dropdown I am retrieving from Locations list

 

Employees list contain Location Name as the lookup column

Filter(Employees,Location in DataCardValue8_1.Selected.Result)

 

Or

Filter(Employees,Location.Value in DataCardValue8_1.Selected.Result)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @Iantaylor0290 ,

I'm a little confused, whether you use two combo boxes or two drop downs?

Please check that. I assume that you mean two combo boxes.

Do you want to display related groups as the group combo box's defaultselecteditems?

 

Could you tell me the data type of LocationName field?

Based on the screenshoots that you provided, it looks like a lookup field.

If so, whether it allows multiple selections?

Whether you have records that are over 500 or 2000?

If it is a lookup field that not allows multiple selections, please set like this:

combo box's Items for LocationName:

Distinct(Locations,LocationName)

combo box's Items for Group:

Distinct(Employees,Group)

combo box's DefaultSelectedItems:

Distinct(
         Filter(Employees,DataCardValue8_1.Selected.Result='Location Name'.Value),
         Group
        )

Do not forget to select Result as the combo box's primary text.

 

Do you have delegation warning? If the problem still exists, then that should be a delegation problem.

You could try to change delegation limit to 2000.

delegation.jpg

 

 

Best regards,

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

Helpful resources

Announcements
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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (19,418)