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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sort on Collection not...
Power Apps
Suggested Answer

Sort on Collection not working

(0) ShareShare
ReportReport
Posted on by 94
Hi All,
As per the title I am trying to sort a collection by a date column before sorting but it isn't working: 
 
This is my code:
 Sort
        (
        ClearCollect
            (  coll_Payment_Temporary,
                   
                    ShowColumns
                    ( Payments_1,
                    'Pay Date', Amount, 'Declared Craig', 'Declared Debbie', 'Payment Reference', GUID,  'Payment Currency'
                    )
            ),
             cref3_paydate, SortOrder.Descending    
           
        );
 
And this is the collection contents after running the code (2nd of October is above 4th of October and so on, )
 
 
 
The only thing that occurs to me, is that the sort is thrown out by the use of the ShowColumns function? 
 
Hopefully, one of you bright sparks can help 😊
 
Best Regards, Craig
 
  • Suggested answer
    mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    hey 
     
    can u try this modification:
    Sort(
        ClearCollect(
            coll_Payment_Temporary,
            ShowColumns(
                Payments_1,
                'Pay Date', Amount, 'Declared Craig', 'Declared Debbie', 'Payment Reference', GUID, 'Payment Currency'
            )
        ),
        DateValue(cref3_paydate), SortOrder.Descending
    );
    
    if it helped please mark as verified answer,
     
    cheers
  • caharland Profile Picture
    94 on at
    Thank you for your reply. Unfortunately, the results are unchanged. 
     
    Kind Regards, Craig
  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at
    Thanks for trying
     
    Can u give this a shot:
     
    Sort(
        ClearCollect(
            coll_Payment_Temporary,
            ShowColumns(
                Payments_1,
                'Pay Date', Amount, 'Declared Craig', 'Declared Debbie', 'Payment Reference', GUID, 'Payment Currency'
            )
        ),
        DateValue(Text(cref3_paydate, "[$-en-US]mm/dd/yyyy")), SortOrder.Descending
    );
     
    Cheers
  • Craig1 Profile Picture
    110 on at
    Thank you for your reply. Unfortunately, I'm still getting exactly the same results.  
     
    Kind Regards, Craig

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard