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 / Combining a seach box ...
Power Apps
Unanswered

Combining a seach box with existing drop downs and search "All"

(0) ShareShare
ReportReport
Posted on by 22

I’ve got two filters on my Moggill Natives app; one for the sharepoint list column ”In the Nursery” and the other for “Growth form”. Both work well except they don’t cater for the “All” possibility.  The “In the Nursery” function on the dropbox is:

 Distinct(SharePointList,'In the Nursery'),

And on the “Growth form” is:

Sort(Distinct(SharePointList,'Growth form'),Value)

The Gallery function is :

Filter(SharePointList,'In the Nursery'=Dropdown1.Selected.Value   && 'Growth form'=Dropdown2.Selected.Value)

My question is ‘What do I need to change in the gallery to add a search box to search for two columns in the SharePoint list (“Species” and “Common Name”) please?

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,905 Super User 2026 Season 1 on at

    Hi @Johno1 

     

    To add a search box to filter your gallery by two columns in the SharePoint list, you can use the Search function in Power Apps. The Search function returns a table that contains records that match one or more search strings in one or more columns. You can specify which columns to search and how to rank the results.

     

    To use the Search function, you need to add a Text input control to your screen and name it SearchBox. Then, you need to modify the Items property of your gallery to include the Search function.

     

    For example, you can use this formula:

    Items =

    Search(
     Filter( 
     SharePointList, 
     'In the Nursery' = Dropdown1.Selected.Value && 
     'Growth form' = Dropdown2.Selected.Value 
     ), 
    SearchBox.Text, 
    "Species", 
    "Common Name" 
    )

     

    This formula will filter your gallery by the values selected in the two dropdowns, and then search for the text entered in the SearchBox in the Species and Common Name columns of the SharePoint list. You can adjust the formula to suit your needs and preferences.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • JC-18030151-0 Profile Picture
    22 on at

    SpongYe, Thank you for your quick reply. Unfortunately, neither filter box is working now, and the search function is now working but delivering a delegation warning. I wonder if an "If blank" expression needs to be added? But thank you anyway.

     

     

  • JC-18030151-0 Profile Picture
    22 on at

    Sorry, the search function is NOT working. My typo and wishful thinking. Cheers.

  • SpongYe Profile Picture
    5,905 Super User 2026 Season 1 on at

    Hi @Johno1 

     

    Lets rewrite the code to avoid delegation:

    With(
     {
     _SharePointList:
     Filter( 
     SharePointList, 
     'In the Nursery' = Dropdown1.Selected.Value && 
     )
     },
     Search(
     _SharePointList
     SearchBox.Text, 
     "Species", 
     "Common Name" 
     )
    )

     

    Please let me know what kind of errors occurs.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • SpongYe Profile Picture
    5,905 Super User 2026 Season 1 on at

    Any updates?

  • JC-18030151-0 Profile Picture
    22 on at

    SpongYe,

    Sorry, I was planting native plants yesterday. To your suggested code change with the 'with' statement:

                      With(
                           {MCN_Plants5:
                                          Filter(
                                                    MCN_Plants5,
                                                    'In the Nursery' = Dropdown1.Selected.Value && 'Growth                      form'=Dropdown2.Selected.Value
    )
    },
    Search(MCN_Plants5
    SearchBox.Text,
    Species,
    'Common Name'
    )
    )

     

     

    I got two lots of errors pertaining to the problem;

    1) Expected operator. We expect an operator such as +.*....

    2) Formatting errors eg If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)

     

    The filter part works OK, but the search doesn't. I was thinking it might be a problem  with the field names? Could I share the app with you to have a look at? But regardless, thanks for the help to date. 🙂

     

  • SpongYe Profile Picture
    5,905 Super User 2026 Season 1 on at

    Hi @Johno1 

     

    Everything look good. Only thing is some syntax are correct in the Search function.

    Columns to search must contain text. Column names must be strings and enclosed in double quotes. 

    So I adjusted your code and try again:

    With(
     { 
     MCN_Plants5:
     Filter(
     _MCN_Plants5,
     'In the Nursery' = Dropdown1.Selected.Value && 
     'Growth form' = Dropdown2.Selected.Value
     )
     },
     Search(
     _MCN_Plants5
     SearchBox.Text,
     "Species",
     "Common Name"
     )
    )

    Otherwise send me a private message to take a more indepth look into this.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 392

#2
WarrenBelz Profile Picture

WarrenBelz 364 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 271 Super User 2026 Season 1

Last 30 days Overall leaderboard