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 / why the gallery is not...
Power Apps
Unanswered

why the gallery is not sorted ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Akki2995_0-1694767430718.png

The column "Date" is a text not a date type! 

Categories:
I have the same question (0)
  • Chris-D Profile Picture
    1,246 on at

    Looking at the event code above the Items box, your Patch() function converts the date to text to save it, so I'm guessing date is a formatted text field. 

     

    You can convert it to a date for sorting with the DateValue() function. Not sure if you can do this directly in the SortByColumns() column parameter but if not you can use AddColumns() combined with your Filter() to create a date column that you can use in your gallery to sort and in whatever controls you need to. 

     

    Try:

    SortByColumnns(
     AddColumns(
     Filter( ...),
     "ReallyDate", DateValue( Date)
     ),
     ReallyDate,
     ...
    )

     

    Reference:

    AddColumns() 

    DateValue()

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    my error is SortbyColumn is an unknown function

     

    ortByColumnns(
     AddColumns(
     Filter(colGridDate; Mitarbeiter = User().Email);
     "ReallyDate"; DateValue( Date)
     );
     ReallyDate;
     SortOrder.Ascending
    )
  • Chris-D Profile Picture
    1,246 on at

    That seems to be missing an 'S'. 

     

    But if you're only sorting on one column then you only need to use Sort(). 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    still shows the error !

     

    Akki2995_0-1694768874846.png

     

  • Chris-D Profile Picture
    1,246 on at

    You need to put the column name "ReallyDate" in "" marks, sorry I should have done that in my example. Like in your original code you have "Date" in "" marks in your SortByColumns function. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    SortByColumnns(
     AddColumns(
     Filter(colGridDate; Mitarbeiter = User().Email);
     "ReallyDate"; DateValue(Date)
     );
     "ReallyDate";
     SortOrder.Ascending
    )

    still dont work !

     

     

  • Chris-D Profile Picture
    1,246 on at

    This is not helpful. What's the error? Can you screenshot showing the error? 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    SortByColumns is a unknown and unsuported function !

  • Chris-D Profile Picture
    1,246 on at

    You don't need SortByColumns(), just change it to Sort() since you're only sorting one column. 

     

    I think this maybe a PowerApps 'quirk'. Sometimes the connect to the server lags and you get errors that aren't really errors. Saving the app, exiting and going back in can sometimes fix this. 

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    i also tried with sort, i also think it is because of power apps ! we will see! 

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard