cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jwf_2020
Level: Powered On

DatePicker filter not selecting any records for my gallery form

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Level 10

Re: DatePicker filter not selecting any records for my gallery form

Hi @jwf_2020,

 

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.

View solution in original post

4 REPLIES 4
v-siky-msft
Level 10

Re: DatePicker filter not selecting any records for my gallery form

Hi @jwf_2020 ,

 

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.

jwf_2020
Level: Powered On

Re: DatePicker filter not selecting any records for my gallery form

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

v-siky-msft
Level 10

Re: DatePicker filter not selecting any records for my gallery form

Hi @jwf_2020,

 

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.

View solution in original post

jwf_2020
Level: Powered On

Re: DatePicker filter not selecting any records for my gallery form

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!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,608)