web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Sort Gallery Earliest to Latest

(0) ShareShare
ReportReport
Posted on by 221

Can someone help me get this gallery to sort by earliest date?  When the app opens, it currently shows the oldest work installed, not the most recent.  Not sure if it matters, but the SP List has the oldest work installed first as well.   Please let me know if more info is needed.  

 

Shaguar357_0-1708362544907.png

Shaguar357_1-1708362650704.png

 

Categories:
I have the same question (0)
  • LEGRANCHE Profile Picture
    on at
    Re: Sort Gallery Earliest to Latest

    HI @Shaguar357 ,

    Your default sort is ascending, you just need to update the formula on IconSortUpDown1.OnSelect to

    UpdateContext({lvSortOrder:If(lvSortOrder=SortOrder.Ascending,SortOrder.Descending,SortOrder.Ascending,})

     

    Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

  • Shaguar357 Profile Picture
    221 on at
    Re: Sort Gallery Earliest to Latest

    Hi @LEGRANCHE 

     

    Thanks for the suggestion.  I did switch the order up and I still have the same issue:

     

    Shaguar357_0-1708380796576.png


    Would you have any other suggestions?

     

    Thanks!

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Sort Gallery Earliest to Latest

    Hi @Shaguar357,

    Modify your update context as below:

    vqiaqimsft_0-1708396853997.png

    UpdateContext({SortDescending1: !SortDescending1})

    Modify the Items property formula as below:

    SortByColumns(list_name, "Date", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))
  • Shaguar357 Profile Picture
    221 on at
    Re: Sort Gallery Earliest to Latest

    Hi @v-qiaqi-msft 

     

    Thanks for that suggestion.  I had to switch the order of ascending and descending, but it's working now.

     

    I appreciate your help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard