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 / Combine Sort() for Dat...
Power Apps
Answered

Combine Sort() for Date with TextSearchBox

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi !
I've learn PA a week ago.
I've struggled to combine Sort()- for Date with TextSearchBox - search by title.

For the Attaching picture.
I tried combine like this but it doesnt work and I have no idea.

 

SortByColumns(Filter([@testingSortByDate], StartsWith(Title, TextSearchBox1.Text)), "requestByDate", Sort(testingSortByDate,requestByDate,Descending))

 

I could do either sort() by Date descending or fill by title only.

 


I really appreciate any help.

Thanks,
David

help.jpg
Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Are you unable to sory by the date field?

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share a bit more about your scenario?

    Do you want to filter your Gallery Items based on the date type column? or just want to sort by date type column?

     

    If you want to filter your Gallery Items based on the date type column, I afraid that the StartsWith() function could not achieve your needs. The StartsWith function could only accept Text type column as search column.

     

    If you just want to sort by date type column, please consider modify your formula as below:

    SortByColumns(
     Filter([@testingSortByDate], StartsWith(Title, TextSearchBox1.Text)), 
     "requestByDate", 
     If(SortDescending1, Descending, Ascending)
    )

     

    Best regards,

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you very much ! 

    I was able to solve it 🙂

     

    Sort(SortByColumns(Filter(Sort([@'Previous Sample Request Database'],'Date Requested',Descending), StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)),'Date Requested',Descending)

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard