cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Leonie
Level: Powered On

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
Highlighted
hpkeong
Level 10

Re: Searching on multiple columns

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
hpkeong
Level 10

Re: Searching on multiple columns

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
Highlighted
hpkeong
Level 10

Re: Searching on multiple columns

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

Leonie
Level: Powered On

Re: Searching on multiple columns

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

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 335 members 6,484 guests
Please welcome our newest community members: