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 / search filter on butto...
Power Apps
Answered

search filter on button click search(not typed in search)

(0) ShareShare
ReportReport
Posted on by 608

I am using below function in gallery

Search( IceCream, "choc", "Flavor" )

 

in gallery control items-

Sort(Search( mysource, searchBar.Text,"Description","Company","Country" ),Country)

Now with 100k records this does not return correct records with fast typing in search box.

 

What I want is a button next to search text box and then on click it should return.

When I put same Sort(Search( mysource, searchBar.Text,"Description","Company","Country" ),Country) on button click the gallery control does not bring the data.

How to bring searched data in gallery control on button click?

Categories:
  • AmitLoh-Powerap Profile Picture
    608 on at

    Also How to combine search from a text box with other dropdown filters like country dropdown, product dropdown.

    So it should do google type search within selected country and products(this is advance scenario)

    search(filter(datasoource) on button clcik search

  • Verified answer
    SpencerLynn Profile Picture
    Microsoft Employee on at

    You can set a context variable when the text changes in the text input.

     

    For the OnSelect of the button

    UpdateContext({ searchTerm: <TextInputControl>.Text })

    Then you can use this value in your Items property for gallery

     

    Search(<DataSource>, searchTerm, <SearchField>)

    This will let you only search when the button is clicked.

  • AmitLoh-Powerap Profile Picture
    608 on at

    thanks!

    How do I combine. For example I have a search button to do google type search and I also have 4 dropdowns with filter exact match search.search.png

    I have below in gallery Items but how do I combine search click(do google type search) and if dropdowns are selected do below filter.

    Filter(datasource,Country=DropdownCountry.Selected.Value || ProductGroup=Dropdown1.Selected.Value)

  • Verified answer
    SpencerLynn Profile Picture
    Microsoft Employee on at

    You can use the output of the Filter function as the DataSource for the Search function, or vice versa, depending onwhich order you want the searching/filtering done.

     

    Something like:

     

    Search(Filter(<DataSource>,Country=DropdownCountry.Selected.Value || ProductGroup=Dropdown1.Selected.Value), <SearchTerm>, <SearchField>) 

     

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 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard