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 / How to Search Multiple...
Power Apps
Unanswered

How to Search Multiple Keywords in a Text Box

(0) ShareShare
ReportReport
Posted on by 57

HELP!!! I am new at this and I am having trouble with one field of my first app.

 

I have a Text Input field that I want users to be able to search multiple keywords at the same time. For example: if a user types Williamson, Travis in the County search box (text input field) I want the results to show all the data cards that contain Williamson and Travis. Right now if you type multiple things like Williamson,Travis or Williamson, Travis or Williamson Travis the gallery goes blank. 

 

This is my gallery formula. If there is a formula that can make the above possible where would I put it (Formulas still confuse me):

Search(Search(Search(Search(Search(Search(Search(Search(Search(TransportationProviders,txtStateFilter.Text,"State"),txtCountyFilter.Text,"County"),txtZipCodeFilter.Text,"ZIP"),txtVendorLookup.Text,"Title"),txtAMBFilter.Text,"Ambulatory"),txtWCVFilter.Text,"WCV"),txtWCVXLFilter.Text,"WCV_XL"),txtTaxiFilter.Text,"Livery_x002f_Taxi"),txtStretcherFilter.Text,"Stretcher_x002f_Gurney")

 

Thank you in advance for any assistance you can provide me with.

 

Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @amemartinez ,

     

    If I didn't misunderstand, your table look like this:

     

    • State
    • County
    • ZIP
    • Title
    • Ambulatory
    • WCV
    • WCV_XL
    • Livery_x002f_Taxi
    • Stretcher_x002f_Gurney

    You have an input field for each of these columns, and you are trying to get the records whose column's value match with the input's value?

     

    Would a mix-up of "Filter()" and "Split()" work for you?

     

    Filter(TransportationProviders,
     And("State" in Split(txtStateFilter.Text, ","),
     "County" in Split(txtCountyFilter.Text,","),
     "ZIP" in Split(txtZipCodeFilter.Text,","),
     "Title" in Split(txtVendorLookup.Text,","),
     "Ambulatory" in Split(txtAMBFilter.Text,","),
     "WCV" in Split(txtWCVFilter.Text,","),
     "WCV_XL" in Split(txtWCVXLFilter.Text,","),
     "Livery_x002f_Taxi" in Split(txtTaxiFilter.Text,","),
     "Stretcher_x002f_Gurney" in Split(txtStretcherFilter.Text,",")
     )
    )

     

  • amemartinez Profile Picture
    57 on at

    I want to be able to just search the County field in the data source, which is one column. So in the CountyFilter text box I want the user to be able to type Wiliamson, Travis and the app would search just the County field for those words and return the records. So the other fields like State, Zip code, Vendor Lookup, etc would be blank and the only box that would have anything in it would be the County box. Does that make sense?

  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    @amemartinez ,

    If you want to search for comma separated values individually, you can do this for one input field, but would have to use the same one for each table field

    Ungroup(
     ForAll(
     Split(
     txtCountyFilter.Text,
     ","
     ),
     Filter(
     TransportationProviders,
     Trim(Result) in County ||
     Trim(Result) in State ||
     Trim(Result) in Zip ||
     . . . . . . . . . .
     )
     ),
     "Value"
    )

     

    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.

    Visit my blog Practical Power Apps

  • amemartinez Profile Picture
    57 on at

    So I entered in the above formula but I am getting blue squiggly line under || and nothing is showing up in my data cards now. This is what I entered in:

     

    Ungroup(ForAll(Split(txtCountyFilter.Text,", "),Filter(TransportationProviders,Trim(Result) in txtCountyFilter || Trim(Result) in txtStateFilter || Trim(Result) in Zip || Trim(Result) in txtVendorLookup || Trim(Result) in txtWCVFilter || Trim(Result) in txtWCVXLFilter || Trim(Result) in txtAMBFilter || Trim(Result) in txtStretcherFilter)),"Value")

     

    Then I tried entering exactly what you put and I get a red squiggly line under all of the red text and blue squiggly under all of the blue below:

     

    Ungroup(ForAll(Split(txtCountyFilter.Text,", "),Filter(TransportationProviders,Trim(Result) in County || Trim(Result) in State || Trim(Result) in Zip || Trim(Result) in Vendor Lookup || Trim(Result) in WCV || Trim(Result) in WCVXL || Trim(Result) in AMB || Trim(Result) in Stretcher)),"Value")

     

    What am I missing? 

     

    I want the reps to be able to search some or all of the text boxes at the same time. Sometimes they won't need to do that but other times they will. I want them to be able to enter multiple county names in the County search box if they need to while utilizing the other search boxes as well. Does this make sense?

     

    This is what the filter pane looks like that I made, that I want them to utilize to get the data of what they need:

    amemartinez_0-1657037954874.png

     

  • WarrenBelz Profile Picture
    154,797 Most Valuable Professional on at

    @amemartinez ,

    The blue line is a Delegation warning as the in filter and Ungroup are not Delegable (neither is Search). If your data source is over 500 records (you can increase this to 2,000), you will only get results from the first 500-2,000 records. You could normally use StartsWith for the filter, but you have the complication of having to split the first values, making it a many-to-many search. You simply cannot do what you are trying on a data set over 2,000 records.

     

    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.

    Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard