So, good people, I have a conundrum; I want to filter a gallery by multiple criteria depending on whether the criteria are selected.
I have this code:
Filter(
colMeeting,
If(
IsBlank(FMLocationCombo.SelectedItems),
true,
MeetingLocation=First(FMLocationCombo.SelectedItems).Title
),
If(
IsEmpty(FMStartDatePicker.SelectedDate),
true,
InteractionStartDate=FMStartDatePicker.SelectedDate
)
)
This works really well, thanks to a previous question and solution.
Here's the rub, it doesn't work if I then deselect the location from the combo box. Its as if something remains in the Combo box, like an empty string.
If I select just a date, I get a list of meetings for that date, regardless of the location. If I then select a location, I correctly get the meetings for that date and location. BUT, if I then deselect the location I expect to again get the set of results I got from just selecting the date; what I actually get is an empty set of results.
Why? How do I solve this.
For context, I also want to extend this code to include another selection from another combo box and then further to populate a 3rd combo box with a list of people and include that into the mix.