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 and Search on a...
Power Apps
Answered

Filter and Search on a gallery - help please!

(0) ShareShare
ReportReport
Posted on by 17

Hello all, I would like some help on searching on a gallery. I have a simple app and am using a SP List as a data source ('Applications').

Ideally, this would be a Filter of items from a Choices column, that can be further narrowed down by a Search of multiple text fields. And maybe throw a further filter in for good measure. Can change the Choices for a text box if easier. I have watched multiple videos, read multiple articles, but every suggestion doesn't seem to work for me ☹️.

 

Each function works splendidly well on its own:

Filter(Applications,Status=StatusDropdown.Selected.Value)     //Changed this from Choice to Text column & 'hardcoded' in the Items: In progress, Approved, Rejected

Search(Applications,SearchBox.Text,"Surname","Company","Email")      // I can also use Filter with StartsWith and multiple conditions, and all of these are good.

 

If the above two could be combined into one, that would do. Colleagues will be using it by focusing on those In Progress and then using Search for specific criteria. Bear in mind there will be over 100 applications at any one time.

Assignee is a Choice column on the List, if that could be integrated as an additional optional filter, that would be grand.

 

Ideal solution: Filter by Status; then narrow down using Search; with final Assignee filter; all should be able to work independently, and together.

 

Every combo I try I get errors: Search then Filter, using And/Or, and various others. It may be a syntax thing as I'm struggling with that; but even copying exactly from, eg Reza's videos, gives the unspecific 'your formula has errors'.

 

Any pointers appreciated! Happy to provide more info.

 

Screenshot (11).png

 

Categories:
  • Verified answer
    cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    Using SharePoint datasource makes searching less than desirable. In SQL or Dataverse could just wraps Search around the filter and go. 

     

    In this case you'll have to use StartsWith() function inside your filters. So something like 

    Filter(Applications,Status=StatusDropdown.Selected.Value && (StartsWith(Surname,Applications,SearchBox.Text) || StartsWith(Company,Applications,SearchBox.Text) || StartsWith(Email,Applications,SearchBox.Text)))  

     

  • WarrenBelz Profile Picture
    156,736 Most Valuable Professional on at

    Hi @PuppetFace ,

    An option here to give you the best possible Delegation functionality in SharePoint is to firstly filter on your drop-down and retrieve the newest records up to your Delegation limit (your filter may result in under this) and the run the Search function locally as below

    With(
     {
     _Data:
     Filter(
    	 Sort(
     Applications,
     ID,
     SortOrder.Descending
     ),
     Status = StatusDropdown.Selected.Value
     )
     },
     Search(
     _Data,
     SearchBox.Text,
     "Surname",
     "Company",
     "Email"
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • PuppetFace Profile Picture
    17 on at

    Thank you, this worked perfectly, and can see from the syntax how it's put together. 👍

  • PuppetFace Profile Picture
    17 on at

    Thanks for your reply Warren. I'll bookmark the reply, I haven't tried it as the above solution did just as I required. I don't expect the results of the initial filter to exceed the Delegation limit - but that may happen in the future.

    I'll do a test of this solution too.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard