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 / Filter a SharePoint li...
Power Apps
Answered

Filter a SharePoint list like Search()?

(0) ShareShare
ReportReport
Posted on by 732

I have a 2000 item and quickly growing list in SharePoint. Currently I am limiting the return by date with a filter to current school year. Once it is pulled in I use the below to filter by name via a text input box.

Search(
 LocalBehavior, 
 NameSearch.Text,
 "StudentFirst",
 "StudentLast"
 )

 I have been asked to allow for historical searches. Ideally this would be completed by filtering the SharePoint list in the same way the Search() does to not need to return the 2000+ records. Is there a way to combine the power of Search and Filter?

Categories:
I have the same question (0)
  • Verified answer
    Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @BrianHFASPS 

     

    If it's just the first and last names you are searching and these are in separate columns, you could use StartsWith on each of the columns, which is fully delegable, so no need to worry about the 2000 datarow limit - sharepoint will serve you as many records back from the result as you need, but the fact that the function is delegable means it will serve them up in an optimised manner of 100 items batches.

     

    The function would be something like:

     

    Filter(

    Localbehaviour,

    StartsWith(StudentFirst, NameSearch.Text) || StartsWith(StudentLast, NameSearch.Text)

    )

     

    Important distinction here is it's a startswith search, not a full contains search - but this shouldn't be an issue in your case as users would be typing from the start of the first/last name, so the approach would be suitable.

     

    Hope this helps

  • BrianHFASPS Profile Picture
    732 on at

    Worked great thanks.

    ClearCollect(
     LocalBehavior,
     Filter(
     'Reports Tracking',
     StartsWith(StudentFirst, NameSearch.Text) || StartsWith(StudentLast, NameSearch.Text)
     )
    )

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard