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 / Multiple Text Search b...
Power Apps
Answered

Multiple Text Search boxes SharePoint List

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

I am new to Power apps.  Help is greatly appreciated!

I want to have 4 search boxes that allow me to search through my SharePoint list.  4 Categories - Title, Skills, Qualifications, Status.  Ideally I would want to be able to search all 4 categories at the same time. 

I would alsoo like a search function that allows me to use the text boxes to search for multiple words in that category and when a word is searched it brings all relevant information across the SharePoint list.  

 

I have tried using but the gallery doesn't display anything, it's blank: SortByColumns(Filter([@AssociateDatabase],StartsWith(Title,TextSearchBox1.Text),StartsWith(Skills,Textsearchbox2.Text),StartsWith(Qualifications,Textsearchbox3.Text),StartsWith(Status,Textsearchbox4.Text)),"Title",Descending) 

 

I have also tried:

Filter(AssociateDatabase,TextSearchBox1.Text in Title||TextSearchBox1.Text in Status|| TextSearchBox1.Text in Rate||TextSearchBox1.Text in Qualifications||TextSearchBox1.Text in 'Based in'||TextSearchBox1.Text in Skills||TextSearchBox1.Text in 'Sector Experience'||TextSearchBox1.Text in Status)

 

When I change TextSearchBox1 to TextSearchBox2 the search function completely stops working 😕.  

 

Filter(Filter(Filter(Filter(Associatedatabase,TextSearchBox1.Text, Title),Textsearchbox2.Text, Skills),Textsearchbox3.Text , 'Qualifications'),Textsearchbox4.Text, 'Status')

All the names in the SharePoint list aren't appearing in the gallery and the gallery sometimes doesn't display any information. 

 

Any help would be greatly appreciated. Thank you!!

 

 

 

 

 

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous  

    You need to specify the type of column (SLOT, Option, Lookup, etc) for your 4 categories in order to determine the proper filter.  

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    First, what types of columns are Title, Skills, Qualifications, Status?  If they are not all Text columns then your formula needs adjustment.

    Also, please clarify if your scenario is that all the results in your list would only be comprised of rows that match all conditions of the 4 textinputs, or if it is comprised of rows that match any of the conditions.

     

    SortByColumns(
     Filter(AssociateDatabase, 
     StartsWith(Title, TextSearchBox1.Text) &&
     StartsWith(Skills, Textsearchbox2.Text) &&
     StartsWith(Qualifications, Textsearchbox3.Text &&
     StartsWith(Status, Textsearchbox4.Text)
     ),
     "Title",
     Descending
    ) 

    The above is for the scenario where all rows must include searched text from all inputs.

    Change the &&'s to || if you want to have rows that match any of the conditions.

     

    Keeping in mind again, all of the above columns are assumed to be Text columns.  If you have different...please post back with types.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    They're all text columns. I have used the condition with the || as I don't need all boxes to populated at the same time but do need time provide that choice if the user wanted to search multiple categories. 

     

    I have put the condition in and it still doesn't seem to work, it does search for items but not all the correct items.

     

    Also would it be possible to use search rather than startswith ?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Search will search based on only one of the TextInput controls, not all 4.  Also, it is not delegable.  If you need searching ability and delegation is not a concern, then the use of the IN operator would be what you want.

     

    So, with the modification to OR ( || ), the formula should provide results.  You seem to indicate that it does but that they are not correct.  Can you elaborate on that statement?

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes 

    I need to be able to have the option to search i.e. skills and status, or skills, status and title or all 4 if needed be. 

    Delegation isn't an issue as theirs's only 150 rows in the the SP list, in the future I can't see the list exceeding 500. 

    I don't think Startswith is the right function for me and search would be better because some of the words searched in the text boxes would be in the middle of a sentence (if that makes sense). How would I use the search function? Thank you!

     

    Search(AssociateDatabase,TextSearchBox1.Text,"Title","Skills","Qualifications","Status") This allows me to search everything in the first text box but I'm not sure how to work it with the rest. 

     

    All the items from the list aren't coming through with the startswith i.e. Richard is in the SP list but when searching on the app his name and details aren't coming through. 

     

    aka96_0-1618304760308.png

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    So as mentioned prior, Search will only search from one TextInput against multiple columns.  This is fine if you plan to only have one search input.  If you continue with the 4 search input controls, then you will need to implement something more like this:

    SortByColumns(
     Filter(AssociateDatabase, 
     TextSearchBox1.Text in Title ||
     Textsearchbox2.Text in Skills ||
     Textsearchbox3.Text in Qualifications ||
     Textsearchbox4.Text in Status
     ),
     "Title",
     Descending
    ) 
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes 

    I have put what you've suggested but now it doesn't filter anything when I type in any of the search boxes. 😕

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Are you seeing any errors?

    Please send me a screenshot of your Gallery Items property and something that you expect to show results.

    Plus a screenshot of your columns from the List Settings in SharePoint.

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Just my two cents but do you really want textboxes to solve this problem.  In general, I like to limit the options given to users because of problems with misspellings, etc.  It is preferable to me to use dropdown controls or multiselect comboboxes when you want to filter for several options.  I use textboxes only when those do not meet the needs.  For example, you can probably use a Dropdown with Distinct(AssociateDatabase, Status) as its items property.  Multiselect Comboboxes with Distinct(AssociateDatabase, Skills) and Distinct(AssociateDatabase, Qualifications and perhaps a TextInput box for the name of the Associate.
    The Screenshot below shows a list of Olympic hockey players filtered by a combobox, two dropdowns and a radio control.  The result is searched based on first and last names.  In this example, I used @RandyHayes 's way of adding a blank value called "ALL" to each control and show his formula in the top right hand side of the screen._1.jpg

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Drrickryp 

    Adding $1 to your $0.02 !!  Definitely would go for a cleaner UI.

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
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard