cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aurelie
Helper II
Helper II

Gallery - item ordering descending

Hello everyone,

 

I created an application in Power Power Apps with multiple screens.

One of them is a History screen. In this screen I used a Gallery control (with title and subtitle) to see all the items.

 

Aurelie_0-1643028005515.png

 

For the moment, we can see that the oldest item is the first one(on the top of the list). I want the opposite => the first item is the newest.

 

I don't have any filters on my gallery items because I want to se all the items ( I have only the name of my data source in the items property)

 

Is it a way to do what I want?

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @Aurelie 

To do this, you would change the Items property of your gallery so that rather than refer to the data source, you would call SortByColumns and pass the data source and sort criteria.

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

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

Hi @Aurelie 

To do this, you would change the Items property of your gallery so that rather than refer to the data source, you would call SortByColumns and pass the data source and sort criteria.

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

 

Tushya_Trivedi
Helper I
Helper I

Tushya_Trivedi_0-1643029352117.png

You can set the sort Icon's OnSelect Property to this
And then in items property of gallery you can sort by 'Created On' column of your data source rather than Title shown below.

Tushya_Trivedi_1-1643029434330.png

 

 

@timl it seems easy now, thank you

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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