cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Searching on multiple columns

I have a gallery based on a Sharepoint list showing the Name and Code of products. I have a DisplaySearch box where I can use a filter on the Name, which works, but what I want to do is be able to search on the "Name", "Code" and also the "About" columns in the Sharepoint list, so that the gallery then shows the products that have whatever words were found in the "Name" "Code" or "About" columns.

 

The Items in my gallery list is set to show items from my Sharepoint list "Barware_1" and that works fine. I now need the searchbar to search through those 3 columns in Sharepoint and display the results in the gallery list and that's where I'm getting stuck. I've taken a couple of screenshots if that helps explain what I'm trying to do.PowerApps pic1.pngPowerApps pic.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Champion
Community Champion

Hi

 

Please modify the defaults search string.

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.

 

Search(DS, TextInout1.Text, "Name", "Code", "About")

 

TQ

 

Hope this helps.

TQ

hpkeong

View solution in original post

3 REPLIES 3
Community Champion
Community Champion

Hi

 

Please modify the defaults search string.

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.

 

Search(DS, TextInout1.Text, "Name", "Code", "About")

 

Hope this helps.

TQ

hpkeong
Community Champion
Community Champion

Hi

 

Please modify the defaults search string.

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.

 

Search(DS, TextInout1.Text, "Name", "Code", "About")

 

TQ

 

Hope this helps.

TQ

hpkeong

View solution in original post

That is working, I had this on the OnSelect field rather than the Items - thank you.

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (10,969)