cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gvaselli
New Member

Filter Date in a Gallery by DatePicker

I am currently trying to filter a large number of records by a specific date set by the date picker. When I user Date=DatePicker.SelectedDate, it give me an error that states, "Date eq 2018-01-10" is not valid. Date being the column name in my list and the specific date being the date selected. When I test using a label to see if the record date and the selected date are equal, I get a true value. Is there any way around this recent bug or is Powerapps going to need to fix this bug in their next update?

1 ACCEPTED SOLUTION

Accepted Solutions

I figured out a way to do it. I created another Single Line text column, on that field I took the date from my date column and copied it as a string in format 'dd/MM/yyyy'. I am using SharePoint as well and this has fixed my issue, now I can do:

 

Filter(Table1,DateConverted2TextColumn = Text(DatePicker.SelectedDate). Now, if my user selects a specific date then I only display in my gallery all items that matches the date picker value. 

View solution in original post

7 REPLIES 7
mabolan
Power Apps
Power Apps

Thanks for raising this issue. I personally can't get the date filter to work either. I've filed a bug and we are having the SharePoint connector team look at it as we speak.

CarlosFigueira
Power Apps
Power Apps

The delegation for date comparisons in SharePoint doesn't work (it hasn't worked in a long time, if ever). You can work around this by using a function that doesn't support delegation for the list. For example:

Filter(
    FirstN(YourSharePointList, 10000),
    Date = DatePicker1.SelectedDate)

I figured out a way to do it. I created another Single Line text column, on that field I took the date from my date column and copied it as a string in format 'dd/MM/yyyy'. I am using SharePoint as well and this has fixed my issue, now I can do:

 

Filter(Table1,DateConverted2TextColumn = Text(DatePicker.SelectedDate). Now, if my user selects a specific date then I only display in my gallery all items that matches the date picker value. 

View solution in original post

The solution provided by @iamlee works for me. Additionally I have created a calculated column which will save the date part of the Date column as text. 

See below picture

 

Date Calculated Column.PNG

How do you reset the date picker filter?

@Jsprince21  I did not reset the DatePicker. In my form by default "Today" is selected in the DatePicker and based on this I show data in the Gallery by filtering data from SharePoint list.

 

So, can you please tell me about your actual requirement?

 

Best Regards,

Mamun

I use a small cancel icon in the corner of the datepicker box with the onselcect set to Reset(DatePickerName)

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (43,094)