web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Combo box to query lar...
Power Apps
Answered

Combo box to query large list 5000+ items

(0) ShareShare
ReportReport
Posted on by 10

I'm attempting to use a combo box to query a large collection.


The list has 15k+ items currently and what I'm trying to do is have the user select an item from a combo box and basically do a where clause to query the list and load it into a gallery.  

 

This is the OnChange Event for the combo box as well as the datepicker

 

ClearCollect(laborAllocation, Filter('Labor Allocation',
Date >= (DatePicker1.SelectedDate-Weekday(DatePicker1.SelectedDate,2) + 1) And
Date <= (DatePicker1.SelectedDate-Weekday(DatePicker1.SelectedDate,2) + 7) And
Project.Id = ProjectCombobox.Selected.ID));

 

the gallery is set to laborAllocation

 

The results should generally a couple dozen to a hundred entries.

 

It doesn't currently work consistently or accurately.

 

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Verbiage211 

    If you are getting unpredictable results, likely you have a delegation issue.  ClearCollect() is not delegatable. Assuming you have maxed the row numbers to 2k in the Settings,  If the number of projects between the dates is >2k then only the first 2k will be in the collection. To test, put a label and the screen and set the Text property to CountRows(laborAllocation).  If it is 2k, then that is the problem. If so, and if you are using Dataverse, then you can create a view for the dates in question and use that in the your filters.  If you are using SharePoint, then you will need a work around. 

     

     

  • Verbiage211 Profile Picture
    10 on at

    The list is a little over 15k items, the result of items between dates with the ID should be about 1-200 records.

     

    if it were a WHERE clause the results will consistently be under 500.

     

    I do have the delegation warning at the moment.

     

     

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Verbiage211 

    Getting rid of the collection: for the items property of the combobox:

     

    With({la:
     Filter('Labor Allocation',
     Date >= (DatePicker1.SelectedDate-Weekday(DatePicker1.SelectedDate,2) + 1) &&
     Date <= (DatePicker1.SelectedDate-Weekday(DatePicker1.SelectedDate,2) + 7)
     )},
     la
    )
    

     

    For the Items property of the Gallery

     

    With({la:
     Filter('Labor Allocation',
     Date >= (DatePicker1.SelectedDate-Weekday(DatePicker1.SelectedDate,2) + 1) &&
     Date <= (DatePicker1.SelectedDate-Weekday(DatePicker1.SelectedDate,2) + 7)
     )},
     Filter(la, Project.Id = ProjectCombobox.Selected.ID)
    )
    

     

     

     

     

  • Verbiage211 Profile Picture
    10 on at

    Thank you very much, I hadn't learned about With before.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Verbiage211 

    It's very helpful in cutting down the verbiage in long and complicated formulas!Smilegif.gif

     

  • Verbiage211 Profile Picture
    10 on at

    Well played my friend,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard