cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Park_23
Level: Power Up

Sorting/Filter Gallery

Currently, this is on the PowerApps gallery so we can search a SharePoint List by three columns:
SortByColumns(Filter(SP_List, Or(StartsWith(Title, txtBrowseSearch.Text),StartsWith(Location, txtBrowseSearch.Text),
StartsWith(Employee.DisplayName, txtBrowseSearch.Text))), "Title", If(SortDescending1, Descending, Ascending))
I need to have the gallery sorted by ‘Date Created’ Newest to Oldest:
Trying to use this: Sort(SP_List,Created,Descending) but not working with the code above. Is there another way to sort the gallery?
Thank you - Park

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Sorting/Filter Gallery

@Park_23 

Have you tried to modify your formula as follows:

SortByColumns(
     Filter(SP_List, 
              Or(StartsWith(Title, txtBrowseSearch.Text),
                   StartsWith(Location, txtBrowseSearch.Text),
                   StartsWith(Employee.DisplayName, txtBrowseSearch.Text)
                  )
              ), 
   "Created", 
   If(SortDescending1, Descending, Ascending)
)

That should give you the sorting on the Created column that you want.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Sorting/Filter Gallery

@Park_23 

Have you tried to modify your formula as follows:

SortByColumns(
     Filter(SP_List, 
              Or(StartsWith(Title, txtBrowseSearch.Text),
                   StartsWith(Location, txtBrowseSearch.Text),
                   StartsWith(Employee.DisplayName, txtBrowseSearch.Text)
                  )
              ), 
   "Created", 
   If(SortDescending1, Descending, Ascending)
)

That should give you the sorting on the Created column that you want.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Park_23
Level: Power Up

Re: Sorting/Filter Gallery

Thank you Randy!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 378 members 5,632 guests
Please welcome our newest community members: