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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,253)