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 / I can't sort a gallery...
Power Apps
Answered

I can't sort a gallery bij a date column.

(0) ShareShare
ReportReport
Posted on by 86

After yor great help earlier I have one more issue which I would like to solve. 
See the pictures below as examples for more info.

In my SPO list I have a lookup column with starting dates of a training. The training is created in another list and in this list I store the people who are attending the list so I need the Start time from the parent list. This works like it should be. 

I even have a filter on the  gallery that work with the date from a datepicker to find the training dates in the futere 

Pic sun2.png

This works but now I would like to sort the gallery on that Date/time Column....... And I tried and tried. more than 2 day now. Thats OK, It rains in the Netherlands so I have time. But it's also annoying that I don't get it done. 
It tried also with this 
SortByColumns(Filter(Sessies; dpFilterCT.SelectedDate <= DateValue(Datum.Value));"datum"; Descending)
but that want work also. 

Maybe, I must work with a collection but as a starter in PowerApps that pretty hard to figure out. 
Here are some more pictures

Pic sun1.pngPic sun2.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Kind regards 
Steven

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    Hi @StevenTIMI263 ,

     

    If you say that you  don't have more than 100 records in this list, you can you try to move the filter on user-side trying this:

     

    Sort( Filter(AddColumns(Sessies;"Date"; DateValue(Datum.Value)); dpFilterCT.SelectedDate <= Date); Date; Descending)

     

    Hope it helps !

  • Steven | TIMI365 Profile Picture
    86 on at

    Thanks for replying. As you see I have an error massage. I tried "Datum" , Datum.value etc but one way or the other I want work.

    StevenTIMI263_0-1605459377803.png

     

     

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @StevenTIMI263  - I used Date in my reply not Datum.Value.

  • Steven | TIMI365 Profile Picture
    86 on at

    yes Thank you for your help But when I take your solution I don't see any error massage. But It want return any items to my gallery

    StevenTIMI263_2-1605461263352.png

    StevenTIMI263_3-1605461306220.png

     

     

  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @StevenTIMI263 Can you show me the error please ...

     

    In my formula I wrote DateValue not Value ...😊

    Sort( Filter(AddColumns(Sessies;"Date"; DateValue(Datum.Value)); dpFilterCT.SelectedDate <= Date); Date; Descending)

  • Steven | TIMI365 Profile Picture
    86 on at

    Hi Gabibalaban, 
    Thanks for helping. This works. but........ Now the connected form gives me an error massage. I suppose that the something with the " Date" value returns this error. See the screen shot. The field "Hoogwerker" is a fixt field and don't need the selected.item.The other field aren't loading........

    StevenTIMI263_1-1605515663967.png

    StevenTIMI263_2-1605515919765.png

     

    I hope you can help

    regards Steven

     

     

  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @StevenTIMI263 
    put on item property of the form the following formula:

    LookUp(Sessies;ID=galCursistem.Selected.ID)

     

  • Steven | TIMI365 Profile Picture
    86 on at

    Hi Gabibalaban ,
    Thank you so much. Everything works now. 
    Very happy with you sharing your knowledge 👍

     

    Kind regards 
    Steven

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 308

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard