cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MaxGustafsson
Regular Visitor

Gallery Search on multiple columns

Hello! I've been struggling with this for the last couple of Days.. 

I have a Sharepoint list that has plenty of data in it, but as of right now, I can only search for a Title or "Kund" (Customer), 

 

What I'm trying to do is search in multiple columns, but I cant seem to get it right.. 

 

Right now I'm using the default:
SortByColumns(Filter([@Serviceformulär]; StartsWith(Title; TextSearchBox1.Text)); "Title"; If(SortDescending1; Descending; Ascending))

 

I've tried to search the forums and do a "Search" or "Filter" Command, but it fails every single time.. 

 

I'd like to use one textbox to search within the Three following columns: 

Datafield: "Title" , "Datum_x0020_f_x00f6_r_x0020_Serv" , "Kundreferens"

DisplayName: "Title" , "DatumService" , "Kundreferens" 

 

The "Datum..." is in a Date format, is it possible to search for Dates in .Text? 

 

editview.PNGview.PNG

 

Thanks in advance!! 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@MaxGustafsson 
Use the OR operator to join multiple filter criteria

SortByColumns(Filter([@Serviceformulär]; StartsWith(Title; TextSearchBox1.Text) Or StartsWith('Datum f r Serv'; TextSearchBox1.Text) Or StartsWith(Kundreferens; TextSearchBox1.Text)); "Title"; If(SortDescending1; Descending; Ascending))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

8 REPLIES 8
mdevaney
Super User
Super User

@MaxGustafsson 
Use the OR operator to join multiple filter criteria

SortByColumns(Filter([@Serviceformulär]; StartsWith(Title; TextSearchBox1.Text) Or StartsWith('Datum f r Serv'; TextSearchBox1.Text) Or StartsWith(Kundreferens; TextSearchBox1.Text)); "Title"; If(SortDescending1; Descending; Ascending))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

@mdevaney 

You may have a problem with the date value if it isn't text in the proper format. 

@Drrickryp 
That's true.  I probably didn't pay close enough attention since the column name was not in English.

 

Dates data types can't be delegated so... not a great method to SEARCH.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

As I suspected… 

 

Thanks @mdevaney  

 

Probably you want to add a calculated text column at the SharePoint side. Format your date text iso, so yyyymmdd. Then refresh your connection and use this column in your filter.

 

I think this is the easiest way to do what you want.

 

Btw, I more like to use Or( condition, condition,...) then Or/||. Easier to read and debug to my opinion. Just sharing 😉

 

Hope this helps.

 

Paul

 

 

Hello Paul, I'm not quite sure what formula you're referring to, none of those in the link below seems to be the right one? 
https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb862071(v%3Doff...

DuncanM
Frequent Visitor

@MaxGustafsson I have been trying to resolve this issue and thought the solution should be as simple as this but couldn't find it anywhere on a feed. thanks eternally for this OR operator solution, you have made my day!

steven_S
Frequent Visitor

@MaxGustafsson I have nothing to say about your case more than I like your name of choice for the test customer "Ronken Johan" ;D 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,531)