cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Leonie
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
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

3 REPLIES 3
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")

 

Hope this helps.

TQ

hpkeong
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (37,308)