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 Not working, show...
Power Apps
Answered

Sort Not working, showing blank gallery

(0) ShareShare
ReportReport
Posted on by 15

I have a vertical gallery in my app to show items from a SP List called TLStatus, the list has around 8,000 items in it. One of the columns is "Due" which is a date column in SP, all of the lines have dates on them.

 

This is my "items" event for the gallery, It is supposed to filter by SF_PROJECT_ID and Status, and sort by Due date-

 

 

Sort(Filter(Filter(TLStatus,SF_PROJECT_ID=sfProjectID),Status="Not Started"||Status="In Progress" || Status="Complete" ||Status="Incomplete"),Due)

 

 

 

If I remove the Sort() function, it loads the items as it should. If I sort by another column, ex customerTasks which is a text column, it works correctly.  


Categories:
  • SebS Profile Picture
    4,876 Super User 2026 Season 2 on at

    @RussMan9O4 

     

    Can You try this one:

     

    Sort(
     Filter(
     TLStatus,
     SF_PROJECT_ID = sfProjectID,
     Status = "Not Started" || Status = "In Progress" || Status = "Complete" || Status = "Incomplete"
     ),
     Due
    )
  • RussMan9O4 Profile Picture
    15 on at

    Same thing happening, Here is with that code-

    RussMan9O4_0-1714045026600.png

     

    And removing the sort-

    RussMan9O4_1-1714045087850.png

     

     

  • SebS Profile Picture
    4,876 Super User 2026 Season 2 on at

    @RussMan9O4 

     

    What Type is the "Due" column? Is it normal single text or by any chance it's complex type?

  • RussMan9O4 Profile Picture
    15 on at

    It's a date/time column

    RussMan9O4_1-1714047291109.png

     

     

    One thing I have noticed is if I use PowerAutomate and a Get Items action, it's showing the name of the column as Notes, I may have repurposed and renamed an old column at some point,

    RussMan9O4_0-1714047217529.png

     

    but in PowerApps it sees that column as Due, my Items value for the date picker is ThisItem.Due.

     

     

  • SebS Profile Picture
    4,876 Super User 2026 Season 2 on at

    @RussMan9O4 

     

    i think they already removed "" but you can check

     

    SortByColumns(
     Filter(
     TLStatus,
     SF_PROJECT_ID = sfProjectID,
     Status = "Not Started" || Status = "In Progress" || Status = "Complete" || Status = "Incomplete"
     ),
     "Due",
    SortOrder.Descending
    )
  • Verified answer
    RussMan9O4 Profile Picture
    15 on at

    That didn't work either, but I did end up finding a solution, Not sure why, but I had to wrap a DateValue() tag around it-

    Sort(
     Filter(
     Filter(
     TLStatus,
     SF_PROJECT_ID = sfProjectID
     ),
     Status = "Not Started" || Status = "In Progress" || Status = "Complete" || Status = "Incomplete"
     ),
     DateValue(Due)
    )

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 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard