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 / Sorting BrowserGallery1
Power Apps
Answered

Sorting BrowserGallery1

(0) ShareShare
ReportReport
Posted on by 6

Hello,

I am trying to sort my screen by date instead of by title. I am unsure of the syntax to use here. My date column is called "Date".

Thanks in advance for any help that can be given.

 

This is the current syntax:

SortByColumns(Filter([@'RV-XFMR-PM'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @TriEssent 

    Please consider changing your Formula to the following:

    SortByColumns(
     Filter([@'RV-XFMR-PM'], 
     StartsWith(Title, TextSearchBox1.Text)
     ), 
     "Date", 
     If(SortDescending1, Descending, Ascending)
    )

    I hope this is helpful for you. 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@TriEssent,

    Based on the issue that you mentioned, do you want to sort the Date column within your 'RV-XFMR-PM'?

    Could you please share a bit more about the scenario?

    I agree with @RandyHayes, the formula he provided is correct, if you just need to sort the Date column and search Title column for the start string, just do it.

    If you also want to search the Date column based on the start string, I think I could do some addition.

     

    SortByColumns(Filter([@'RV-XFMR-PM'], StartsWith(Text(Date), TextSearchBox1.Text)), "Date", If(SortDescending1, Descending, Ascending))

     

    Note: This may cause a delegation warning for the Text() function. If your data set is not very huge, you could ignore it.

    Hope it could help you.

    Best Regards,

    Qi

     

  • TriEssent Profile Picture
    6 on at

    Thank you for your help, @RandyHayes. If I may ask - where does the SortOrder.Descending go to make it sort with the newest dates on top?

  • TriEssent Profile Picture
    6 on at

    This seems to work:

     

    SortByColumns(Filter([@'RV-XFMR-PM'], StartsWith(Title, TextSearchBox1.Text)), "Date",Descending)

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @TriEssent 

    Yes, that will give you a sorted list of dates with most recent at the top.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard