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 / SearchTextBox with Mul...
Power Apps
Answered

SearchTextBox with Multiple criteria

(0) ShareShare
ReportReport
Posted on by 61

I have a table called "Movements", with two columns - "Name" and "Location"

NameLocation
JayTasmania
KaySydney

 

I have created a textbox to use as a search box, named "FilterTextBox"
below is the function I used to search for the "Name" in the Gallery

Georgetown15x_0-1600834466067.png

How do I incorporate "Location" into the function? so that I can also search for both name and location.

Your insights and solution are much appreciated. 

Categories:
I have the same question (0)
  • Georgetown15x Profile Picture
    61 on at

    Someone please help?

  • Georgetown15x Profile Picture
    61 on at

    @PaulD1  could you please help?

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@Georgetown15x,

    Based on the issue that you mentioned, do you want to search two columns within a Search box?

    Could you please share a bit more about the scenario, do you want to search and dispaly the filtering result within a Gallery?

    Combine that with your description, you want to sort the 'Name' column based on the searched result if there is something with the TextSearchBox and you want to sort the 'Name' column within the data source if there is nothing within the TextSearchBox.

    I think that the Search() function could achieve your needs. There is something syntax wrong with your formula.

    I have a test on my side, please take a try as below.

    Set the Items property of the Gallery as following:

     

    Sort(
     If(
     IsBlank(FilterTextBox.Text),
     Movements,
     Search(
     Movements,
     FilterTextBox.Text,
     "Location",
     "Name"
     )
     ),
     "Name"
    )

     

    Best Regards,

    Qi

     

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 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard