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 / Search within multiple...
Power Apps
Answered

Search within multiple columns

(0) ShareShare
ReportReport
Posted on by 7

Hi,

I'm new to this and I've looked through several posts to find an answer, but no joy.

 

I tried following the "Filter, Search and LookUp function"-article. But it still messes up.

 

Problem:

I'm trying to set up an easy search field with a gallery to show the results. The DS is an Excel file, it's on my OneDrive and it connects perfectly.

Table name is: Employee

Text Input name: TextInput4


Name       Location

KimLocation 1
AlfLocation 2
AndreasLocation 3
MathiasLocation 1
LeifLocation 2

 

In the Items property of the gallery I use this formula:
Search(Employee,TextInput4.Text,"Name")

This works well and it presents the results.


If I use the following:

Search(Employee,TextInput4.Text,"Location")

It also works perfectly.

Here is the problem. I want to search both columns. I use this formula:
Search(Employee,TextInput4.Text,"Name","Location")

This presents no results. And for the life of me, I can not understand why,

Categories:
I have the same question (0)
  • Verified answer
    JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    According to Microsoft, it appears that search only returns results from a single column.   If you want to get results from multiple columns you would need to use the Filter function like this:

    Filter(Employee, TextInput4.Text in Name || TextInput4.Text in Location)
  • NVN_krg Profile Picture
    7 on at

    So simple. 
    Thanks! 

    I was trying with this Syntax (from the article). They should remove it if it doesn't work?

    Search(Table*, SearchString, Column1 [, *Column2*, ... ] )

    • Table - Required. Table to search.
    • SearchString - Required. The string to search for. If blank or an empty string, all records are returned.
    • Column(s) - Required. The names of columns within Table to search. Columns to search must contain text. Column names must be strings and enclosed in double quotes. However, the column names must be static and cannot be calculated with a formula. If SearchString is found within the data of any of these columns as a partial match, the full record will be returned.
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I may have misunderstood that when I read it.  I didn't look at the examples, but it wasn't working for you.  I know that the filter option works as I have used it many times.  Not sure why the searching didn't work for 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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard