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 / Struggling with search...
Power Apps
Answered

Struggling with search function

(0) ShareShare
ReportReport
Posted on by 12

Hi,

 

I spent a whole day trying to make a search input with multiple columns but I'm not able to do it.

 

I have a gallery linked to a SharePoint list, where I have the columns Name(Person), Old(text) and New(text).

 

I'm able to search the DisplayName for the Name column using this code:

 

Search(AddColumns(database,"DisplayName",Name.DisplayName), SearchBox.Text, "DisplayName")

 

 

How can I improve this code to be able to search also for the content on the Old and New columns?

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @renatobessa,

     

    Search() can accept additional columns as optional parameters - the function expects Text columns which is why the addcolumns was necessary.

    Search(
     AddColumns(database,"DisplayName",Name.DisplayName), 
     SearchBox.Text, 
     "DisplayName",
     "Old",
     "New"
    )

    Do note that this function is not delegable for SharePoint and will not work as expected with list exceeding your Data Row Limit (see app settings, default 500 - Max 2000).

     

    Should "Old" or "New" give errors, the naming of those columns may be incorrect. Use your original code and write a comma after "DisplayName" -> Power Apps will show a list of viable columns.

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • renatobessa Profile Picture
    12 on at

    Worked like a charm, that tip to write a comma after the "DisplayName" was amazing! 

    Thank you

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard