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 Apps
Unanswered

Search Text Input

(0) ShareShare
ReportReport
Posted on by 52

Can you filter a Galley via text search input by multiple columns?

I have a gallery that has data from 3 columns I want to search Community, Marker ID, Damage Observed.

 

Current code: Filter('Maintenance Issues',StartsWith(Community,TextSearchBox1_1.Text))

 

This searches the Community column successfully, but I also would like to search by Damage Observed. Can anyone provide me the modified code? Or is there a simple way to text input search all data? 

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @PriscillaB - assuming you want to search multiple columns from the same Text Input control, you can use the non-delegable Search function:

     

     

    Search(
     'Maintenance Issues',
     TextSearchBox1_1.Text,
     "Community",
     "DamageObserved",
     "MarkerID"
    )

     


    For a delegable search, use separate Text Input controls with the StartsWith function:

     

     

    Filter(
     'Maintenance Issues',
     Len(TextSearchBox1_1.Text) = 0 || StartsWith(
     Community,
     TextSearchBox1_1.Text
     ),
     Len(TextSearchBox1_2.Text) = 0 || StartsWith(
     'Marker ID',
     TextSearchBox1_2.Text
     ),
     Len(TextSearchBox1_3.Text) = 0 || StartsWith(
     'Damage Observed',
     TextSearchBox1_3.Text
     )
    )

     

  • PriscillaB Profile Picture
    52 on at

    Sorry I'd like it to be a delegable search, and I'd like to avoid multiple text input searches

  • PriscillaB Profile Picture
    52 on at

    If I use the code provide on one search text box, and do a search the gallery filters to empty

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @PriscillaB - assuming your data source is SharePoint, you can also use:

    Filter(
     'Maintenance Issues',
     Len(TextSearchBox1_1.Text) = 0 || StartsWith(
     Community,
     TextSearchBox1_1.Text
     ) || StartsWith(
     'Marker ID',
     TextSearchBox1_1.Text
     ) || StartsWith(
     'Damage Observed',
     TextSearchBox1_1.Text
     )
    )

     

  • PriscillaB Profile Picture
    52 on at

    Using this code, leaves only 1 result in the gallery before even doing a search

    PriscillaB_0-1705702154863.png

     

    Here is a screenshot of the fully populated gallery &  one showcasing search result with just searching "Community"

    PriscillaB_1-1705702275764.png                      PriscillaB_2-1705702317807.png

     

     

     

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @PriscillaB please confirm the data types for your search fields (Single Line Text, Single Choice, Date, Multi-Select Choice, Number etc)

  • PriscillaB Profile Picture
    52 on at

    Are you referring the data type of the Columns?
    Community - Single Line
    Damage Observed -Multi Line

    Marker - Look up  (this search isn't as important)

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @PriscillaB  - single line text columns which allow multiple lines of text, and complex column types such as LookUp columns are not delegable column types.

  • PriscillaB Profile Picture
    52 on at

    So I am not able to search the Damage Observed Column? 

    I don't recall the code that I had in previously, but I was in fact able to search any word contained with the Damage Observed field and it would filter the list

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @PriscillaB - you can certainly search on that column using the StartsWith function, but you will only be able to search on the first 500 (maximum of 2000) rows in your data source.

     

    I have just run the suggested code in my environment and the Gallery is correctly populating. Could you share screenshot of the code you have in the Items property in your Gallery?

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard