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 / Date filter on gallery...
Power Apps
Unanswered

Date filter on gallery error

(0) ShareShare
ReportReport
Posted on by 825

Hi i All following code on my gallery items, 

i already have sortby filed which is sorting with names, but i also want that this should sort based on date selected. 

 

The code does not show any error, but this is also not updating the gallery items according to the specific date selected. 

 

please note: the formula works on search items by name, and sort by ascending descending, but this is not working for datepicker1.selected date why? 

 

please see code below 

SortByColumns(
 Filter(
 'Petty Cash & GL Code',
 
 // here we are saying that the status variable must be "All",
 // which will then not filter any items, or else the status must match the variable
 StatusResult="All" || Status = StatusResult,
 
 // here we are saying, the textbox text is a blank or else it must
 // additionally filter the above by EmployeeName based on the Textbox Text
 SearchBox.Text = "" || StartsWith('Full Name', SearchBox.Text) ||( Created =(DatePicker1.SelectedDate))
 ),
"Title",
If(SortDescending1, Descending, Ascending) 
) 

 

Please correct me if I'm wrong somewhere. thanks 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    Kindly check the Format of created column, if its a text then convert the

    DatePicker to text as well:

    DateValue(Created)=DatePicker.SelectedDate)

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Tapesh and @eka24 

    I set up a test using a SharePoint file and was able to make it work by converting both sides of the formula to ShortDates using the Text() function. 

    Filter(splList,Text(Modified,ShortDate)=Text(DatePicker1.SelectedDate,ShortDate))

     

  • eka24 Profile Picture
    20,923 on at

    As i said earlier the issue is the format difference between created and datepicker.

    Therefore:

     

    SortByColumns(

       Filter(  'Petty Cash & GL Code

       // here we are saying that the status variable must be "All",

       // which will then not filter any items, or else the status must match the variable

       StatusResult="All" || Status  = StatusResult,

       // here we are saying, the textbox text is a blank or else it must

       // additionally filter the above by EmployeeName based on the Textbox Text

       SearchBox.Text = "" || StartsWith('Full Name', SearchBox.Text) || Text(Created, "dd-mmm-yyyy") =Text(DatePicker1.SelectedDate, "dd-mmm-yyyy"))

       ),"Title",If(SortDescending1, Descending, Ascending))

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Tapesh Profile Picture
    825 on at

    @eka24 @Drrickryp 

     

     

    Please see the screent shot below, i guess this shows a delegation error and also this is not working the way it should, when i select the date its still same. 

     

    Display.png

  • eka24 Profile Picture
    20,923 on at

    Change it to the option by @Drrickryp 

    Text(Created, ShortDate) =Text(DatePicker1.SelectedDate, ShortDate)

    Do you get same result

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Tapesh Profile Picture
    825 on at

    @eka24  yeah there is no change 

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 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard