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

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

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

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 62 members 3,997 guests
Please welcome our newest community members: