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 / DatePicker filter not ...
Power Apps
Answered

DatePicker filter not selecting any records for my gallery form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have a Filter form which I want to use to select records for a gallery from.

 

My gallery form has the following items property

 

SortByColumns(Search(Filter('[dbo].[View_Tasks]', ProjID = drpProject.Selected.ProjID And StartDate >= dteFilterStartDate ), TextSearchBox1.Text, "Memo"), "Memo", If(SortDescending1, Descending, Ascending))

 

The first part of the filter works regarding the selected project which the users selects from a drop down list of projects and I have data showing in the gallery. However the date filter does not. This part below.

" And StartDate >= dteFilterStartDate "

 

There is no error but no records are returned

 

The datepicker field is dteFilterStartDate and StartDate is field name in the datasource.   What am I doin

 

Categories:
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Do you mean dteFilterStartDate  is a Date picker control?

    If you want to call the selected date from date picker, you should use DatePicker1.SelectedDate.

    Please try this:

     

    SortByColumns(Search(Filter('[dbo].[View_Tasks]', ProjID = drpProject.Selected.ProjID And StartDate >= dteFilterStartDate.SelectedDate ), TextSearchBox1.Text, "Memo"), "Memo", If(SortDescending1, Descending, Ascending))

     

     Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks Sik,

     

    That syntax generated an error in the formula so it does not work.

     

    Also what is the best way to have a user enter a valid date? The date picker does not let you enter the date manually. Is there a better control for this?

     

    Best Regards,

     

    John

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Can you show the error information?

     

    If you want to enter the date manually, just use textinput box and Date function to get that.

    Create three text input boxes for users to enter Year, Month and Day, then use Date function to combine a date.

    Annotation 2019-11-06 111007.png

    Hope this helps.

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I created an excel data source and used the formula with dtfilterStartDate >= datepicker1.selecteddate and that worked but it would NOT work for my sql data source which is what I really it to do.  So for most people this is the correct solution.

     

    Do you know of any issues that require a different solution for sql server dates?

     

    Thanks for all your help!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard