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

Search (filter) gallery by multiple colums in a Sharepoint list, and sort by date?

Hi All,

First off, I'm using the default "Search box" that is generated when making an app based on a Sharepoint list. 

 

So I've managed to edit the default gallery filter so I can filter by the column I want (I'm not an advanced user):

SortByColumns(Filter([@MySharepointList], StartsWith(Column_I_Want, TextSearchBox1.Text)), "Column_I_Want", If(SortDescending1, Descending, Ascending))

 

How can I add a "Column_I_Want_2", so that I can search based on 2 different columns. Say I have one for names and another for colors. How can I ass both so that I can search and get results from each column?

 

Also, is it possible to change it so that all the results are always sorted by created date, new to old?

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @EriSto ,

Something like this

SortByColumns(
   Filter(
      [@MySharepointList], 
      StartsWith(
         Column_I_Want, 
         TextSearchBox1.Text
      ) ||
      StartsWith(
         Column_I_Want2, 
         TextSearchBox1.Text
      )
   ),
   Created, 
   Descending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @EriSto ,

Something like this

SortByColumns(
   Filter(
      [@MySharepointList], 
      StartsWith(
         Column_I_Want, 
         TextSearchBox1.Text
      ) ||
      StartsWith(
         Column_I_Want2, 
         TextSearchBox1.Text
      )
   ),
   Created, 
   Descending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Thank you!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (18,162)