Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Using context variable to filter collection not working

Hi All

I got strange issue - I have a context variable "DateS" that I use on a few screens (so it should create separate variables for each screen). I hae afew buttons that changes DateS, and I am trying to filter a collection, which is Items in a gallery:

      Filter(CBookings, DateS in ParkingDateS)
And its always makes gallery empty, although DateS definitely got value that few rows in collection got, I am monitoring it .

But if I rename variable to something that is not used on any screen
     Filter(CBookings, DateS1 in ParkingDateS)
or make DateS global variable

      Set(DateS, "25-01-2021")
than it filters fine
Is there something I dont know about using context variables?



Super User
Super User

Actually there is something you don't know about Date type columns. They aren't text so you can't use them with the"in" operator

But if I try context variable with unique name that is not used on any other screen, it works.

And I tried  Filter(CBookings, ParkingDateS = DateS) with the same result - if I use variable with unique name, it works

Helpful resources

2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,010)