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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to add search box
Power Apps
Answered

how to add search box

(0) ShareShare
ReportReport
Posted on by 327

Hi all

 

how can I add a search box? Based on the code I have

If(Dropdown1.Selected.Value = "All",colWfcontacts,Filter(colWfcontacts,Locality.Value = Dropdown1.Selected.Value))

 

thank you

Categories:
I have the same question (0)
  • Verified answer
    mmollet Profile Picture
    3,187 on at

    Generally a serchbox is just a textinput. The gallery is where the code goes that makes the magic happen. In your gallery.Items property you would filter the results based on what was typed in the search box. The real issue is the fact that you will more than likely like the the searchbox the best when you use the In function but that function is non-delegable. Here is with and without the In function:

     

    Equals a value (fully delegable but search has to match exact string)

    Filter(SPListName, ColumnName = SearchBar.Text)

     

    Found in a value (not delegable but will find any matching substring in the column value)

    Filter(SPListName, SearchBar.Text In ColumnName)

     

    Starts with a value

    Filter(SPListName, StartsWith(ColumnName, SearchBar.Text)

     

    You could also look into search as well... many options depending on your situation and number of entries in list etc. Basically the idea is to filter the gallery on the user's input into the 'search box' control.

  • moerah Profile Picture
    327 on at

    i manage to get it by watching Reza Dorrani on YouTube I used this code like you said "StartsWith"

    Filter(
     WFContactsList,
     (StartsWith(
     StaffName,
     TextInput2.Text
     )) && ( Locality.Value = Dropdown1.Selected.Value || Dropdown1.Selected.Value = "All")
    )

    Thank you

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard