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 / search bar and filter ...
Power Apps
Answered

search bar and filter button

(0) ShareShare
ReportReport
Posted on by 6

Hello- I am trying to build a glossary of terms for work. I currently set up a search box for the gallery, but I cannot figure out how to attach a letter navigation to it at buttons to filter out to just the rows that have a specific letter in a column on my sharepoint list. Looking to make them buttons for A-Z. my current gallery items is set to: Search('Test Glossary List', 'Search Box'.Text, "Title", "Definition") 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @azbilly ,

    Is that a Delegation error you can see?

    Do the fields start with the letter or is it anywhere in them.

    If starting - you can try

    Filter(
     'Test Glossary List', 
     StartsWith(
     Title,
     'Search Box'.Text
     ) || //I assume you want OR here
     StartsWith(
     Definition,
     'Search Box'.Text
     )
    )

    Please advise if this is your situation.

     

    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.

  • azbilly Profile Picture
    6 on at

    Do I apply that to the gallery items? If so, what do I apply to each letter's button? Currently I have the search box functionality working to search based off the title and definition. In addition to that functionality, I want to add a singular button for each letter (A-Z) to filter to only the words that start with that letter in the title field. So really hoping for both options to work in tandem together. 

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    Hi @azbilly ,

    With the code I supplied below

    Filter(
     'Test Glossary List', 
     StartsWith(
     Title,
     'Search Box'.Text
     ) || //I assume you want OR here
     StartsWith(
     Definition,
     'Search Box'.Text
     )
    )

    if the user types an a in ‘Search Box’, the gallery will automatically filter to items in EITHER Title OR Definition starting with a.

    As an added bonus, if you set the Default of ‘Search Box’ to “” (empty string), all the items will display until the user types something in. Also multiple letters can be used so man  will get everything starting with this.

     

    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.

     

  • v-siky-msft Profile Picture
    on at

    Hi @azbilly 

     

    We can use Variable to pass the selected button letter and apply it to Gallery Items code. Please check this:

    1. Add 24 buttons from A-Z

    2. Set OnSelect property of each letter button to pass their letter to Variable.

    Set(Var_Letter, "A")

    Set(Var_Letter, "B")

    ...

    Set(Var_Letter, "Z")

    3. Modify Gallery Items property:

     

    Filter(Search('Test Glossary List', 'Search Box'.Text, "Title", "Definition"), StartsWith(Title,Var_Letter))

     

     

    Snipaste_2020-03-10_10-01-32.png

    Hope this helps.

    Sik

  • WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at

    HI @azbilly ,

    A couple of possibilities here. Please tag whichever one suits your needs to continue this thread.

  • azbilly Profile Picture
    6 on at

    @v-siky-msft - This is exactly what I am looking for! Thank you! Can I ask to expand on it though and how I would right it up with a rest button to show all listed items again? AND is there a way to set the default to show all items in the list until a button is selected? Thank you so much!!

  • Verified answer
    v-siky-msft Profile Picture
    on at

    Hi @azbilly ,

     

    To make Gallery show all items by default, set OnStart/OnVisible property: Set(Var_Letter, "");Set(Var_Search, "")

    To rest the gallery:

    1. Set OnChange property of search text box: Set(Var_Search,'Search Box'.Text)

    2. Modify Items property of Gallery: 

     

     

    Filter(Search('Test Glossary List', Var_Search, "Title", "Definition"), StartsWith(Title,Var_Letter))

     

     

    3. Add a Rest button, set OnSelect property: Set(Var_Letter, "");Set(Var_Search, "");Reset('Search Box')

    Test Result:

    GIF_45.gif

    Sik

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard