cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AdrianAtEckoo
Level: Powered On

Sorting gallery by Date Now()

Hi

 

I'm trouble sorting a gallery by its date created. 

 

My table has a Date column and it is automatically filled out with Now() function. 

But I cant seem to be able to sort the gallery using 

 

SortByColumns(datasource, "Date", Ascending) or even Descending. 

 

I would like to so that it puts the newest entries at the top of the gallery.

 

Thanks in advanced

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Sorting gallery by Date Now()

Hi, This should work to sort them with the newest at the top. SortByColumns('DataSource',"Created",Descending) Hope it works for you Smiley Happy
5 REPLIES 5

Re: Sorting gallery by Date Now()

Hi, This should work to sort them with the newest at the top. SortByColumns('DataSource',"Created",Descending) Hope it works for you Smiley Happy
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Sorting gallery by Date Now()

Where are you using the SortByColumns expression? If you use it in the Items property of the gallery, then you should see it ordered by the Date column.

You can take a look at the attached app, it shows one example of using the SortByColumns function in the gallery to show the newest items on top.

moshem
Level: Powered On

Re: Sorting gallery by Date Now()

Where can i put put this command?
What is the right property for it?
In the Item Propety i allready have a search command.

 

 

Re: Sorting gallery by Date Now()

If you want to keep your search function then your formula will change to this

 

SortByColumns(Search(Protocole,TextInput1.Text,"Title"),"Created",Descending)

 

Hope this helps Smiley Happy

moshem
Level: Powered On

Re: Sorting gallery by Date Now()

Thank you!

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: 41 members 4,065 guests
Please welcome our newest community members: