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 / How to search a browse...
Power Apps
Answered

How to search a browse gallery with multiple words against multiple words?

(0) ShareShare
ReportReport
Posted on by

For example, I have "Michael CK Jackson" in my Gallery. By search "Michael" or "Jackson" can get the result. 

But I cannot get result by type in "Michael Jackson". How can I work it out?

 

Below is my script:

 

SortByColumns(Filter(Phonebook,
(((StartsWith(Split(Name," "),TextSearchBox1.Text))
), "Name",Ascending)

 

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    According to your description, I've made a test for your reference:

     

    1\ This is my test list ‘LIST94’.

    v-xiaochen-msft_0-1615454050098.png

     

     

    2\ Add a texinput control ‘TextInput1’

     

    3\ Add a gallery control and set its Items property to:

    Filter(ForAll(LIST94 As A,If(CountRows(Filter(ForAll(Split(TextInput1.Text," ") As B,If(B.Result in A.Test,{Value:"A"})),!IsBlank(Value)))=CountRows(Split(TextInput1.Text," ")),A)),!IsBlank(Test))

     

    4\ The result is as follows:

     

    v-xiaochen-msft_1-1615454082104.png

    v-xiaochen-msft_2-1615454091986.png

    v-xiaochen-msft_3-1615454105338.png

    v-xiaochen-msft_4-1615454117481.png

     

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.

     

  • Community Power Platform Member Profile Picture
    on at

    Thank you very much. I don't expect I can get answer so soon. I tested it is working and at the moment I am not sure what the syntax means ( there is so much to learn !)


    Just one more question, I have another condition is to use same input keyword (TextSearchBox1.Text) to match with LIST94.JobTitle. How can I merge your syntax with below?

     

    SortByColumns(Filter(LIST94,
    ((if B.Result in A.Username)
    ||(StartsWith(JobTitle,TextSearchBox1.Text)),
    "Username",Ascending)



  • henk2055 Profile Picture
    13 on at

    Hi! That works perfectly! What if I want to highlight all the matching words? I get it to work in the first two of your example, but not the last two.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard