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
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
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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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