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

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
WarrenBelz
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
WarrenBelz
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
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (26,770)