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 / Searching large data s...
Power Apps
Answered

Searching large data set in gallery by Text Box and year

(0) ShareShare
ReportReport
Posted on by 47

Hi,

 

I have a sharepoint list that has huge amounts of Items going all the way back to 2015.

 

Each item has a unique number (Column "eTracker Number") 

In my gallery I have successfully added a text box search for that number with this code:

 

Filter(eTrackers, TextInput1.Text in 'eTracker Number')

 

but this shows a delegation warning (May not work with large data sets). It only finds me the items from 2015 also.

 

How can I add to this code in order to search in the text box depending on the current year and last year or the last 200 or so entries?

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @MJS1987 - some comments.

     

    By "huge amounts of items", I am assuming you have over 2000 records. You cannot Filter on a Date field using a Text Input Control (this control returns a string). In addition, the In function is not delegable.

     

    I would suggest you use the "=" operator or the StartsWith function (which are delegable), together with a Date Picker.

    E.g.:

     

    Filter(
     eTrackers,
     Len(TextInput1.Text) = 0 || StartsWith(
     'eTracker Number',
     TextInput1.Text
     ),
     'Your Date Column' < DatePicker1.SelectedDate
    )

     

     

    Alternatively, you could insert a Checkbox control into your screen. If that Checkbox is checked, the Gallery will filter to display only records created from the current year.

     

     Filter(
     eTrackers,
     Len(TextInput1.Text) = 0 || StartsWith(
     'eTracker Number',
     TextInput1.Text
     ),
     !Checkbox4.Value || Created >= Date(
     Year(Today()),
     1,
     1
     ) && Created <= Date(
     Year(Today()),
     12,
     31
     )
     )

     

    These are only a couple of examples and there are many others, but the key point is that the functions used need to be delegable with your data source.

     

    Further reading:

     

    https://learn.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-operations-for-sharepoint 

  • MJS1987 Profile Picture
    47 on at

    Very grateful. Thank you so much. 

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard