cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.
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.
Highlighted
Park_23
Level: Power Up

Re: Sorting/Filter Gallery

Thank you Randy!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 267 members 4,284 guests
Please welcome our newest community members: