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 filter multiple...
Power Apps
Unanswered

How to filter multiple keywords of the same field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I'm creating a screen that will search for department field. For example, the department field may show "WEC NAW - WCF,WCE,WCM". The problem is filter function only works if we type/search exactly what it is.

 

For instance, if I type "WCF WCE" or "NAW WCF" in search box, it display nothing. But it works if I type "WCF, WCE" (with comma). So, what I'm trying to do is I want it to ignore comma (,) and dash (-) and it should be able to search for any word available in that field. Is this possible?

 

Right now, I'm having this code in my gallery items:

Filter(People, If(!IsBlank(TextSearchBox1.Text),TextSearchBox1.Text in department))

 

Thank you for your time. 

 

Categories:
  • RusselThomas Profile Picture
    4,014 on at

    Hi @Anonymous ,

    Have you looked at the Search() function?

    Note that Search() is not delegable, but then again, neither is "in" - but effectively it would change your filter code as follows;

    Search(People, TextSearchBox1.Text, "department")

     Hope this helps,

    RT

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @RusselThomas 

    It doesn't work. I still need to put "," or "-" to make it works.

  • RusselThomas Profile Picture
    4,014 on at

    Hi @Anonymous ,

    Is your field a plain text field?

    To demonstrate the Search() functionality, try this;

    Create a new screen.

    Add a button, set it's OnSelect: property to;

    ClearCollect(collectSearch, 
     {Value: "WEC NAW - WCF,WCE,WCM"}, 
     {Value: "abc - def, ghi, jkl"},
     {Value: "mno - pqr, stu, vwxyz"})

    Add a Text Input, call it searchTextInput

    Add a Gallery with a single field layout and set it's Items: property to;

    Search(collectSearch, searchTextInput.Text, "Value")

    Run the app, push the button and play around with the search input - you'll notice it returns rows where what you type appears anywhere in the field;

    comm2Search.gif

    Note:

    This is on a collection, so there's no delegation issues.

    The field type is simple - i.e. just a plain text value.  If you're trying to filter on or search a complex field then this would not work.  

    Kind regards,

    RT

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard