cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nagaraj007
Post Patron
Post Patron

Sort by Date and Time

Hello All,

 

Automatically it should show the latest one as per the date and time irrespective of URN and modified by. Please advice how to do this.

 

Items in the list are 

1. URN 

2. Date and Time

3. Modified By 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @nagaraj007 ,

 

SortbyColumn function just returns the sorted table, doesn't modify the data.

Please ensure the Text property URN label in Gallery is ThisItem.URN

1. Click URN label in Gallery

2. set Text property to ThisItem.URN

Snipaste_2020-03-06_13-54-55.png

Sik

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi @nagaraj007 

You should be able to use the SortByColumns function to do this.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-sort 

The formula you would use for the Items property of your gallery would look like this:

SortByColumns( YourList, "DateColumn", SortOrder.Descending )

 

Hello,

 

I used the same formula as per your advise, however the URN got changed to SAMPLE VALUE everywhere. How to get back the original number in place of Sample Value. 

Please find the screen snip for your reference.

Hi @nagaraj007 ,

 

SortbyColumn function just returns the sorted table, doesn't modify the data.

Please ensure the Text property URN label in Gallery is ThisItem.URN

1. Click URN label in Gallery

2. set Text property to ThisItem.URN

Snipaste_2020-03-06_13-54-55.png

Sik

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,347)