Hi andnik!
The filtering you want is referred to as “facet filtering” or “faceted navigation,” where a facet is one of many properties of items in a list that you can use to winnow down that list.
For example, if you were shopping for pool noodles, one facet of a pool noodle might be its length and another might be its color. So if you chose both ‘6 foot’ for the length facet and ‘Orange’ for the color facet, you’d expect to see only pool noodles that are both 6-foot long and orange.
Here’s a post presenting a strategy for facet filtering that can handle any number of facets. The example posted there uses checkboxes for each facet instead of drop-lists and a predictive search, but the basic strategy is the same:
- Create one filter per facet in OnLoad of the repeater or in OnPageLoad
- Be sure that the ‘delete other filters’ checkbox for any filter is not checked, because you need all filters to be active simultaneously
- Ensure each filter allows for the “nothing chosen” case: for you that would mean showing all rows for a facet if the dropdown says ‘Any’ (or if the search field is blank)
- For each possible value a facet can have at the given moment, add an expression in that facet’s filter to handle that value. In the search case, of course, where you want to show all rows if the field is blank or, when not blank, rows that match the field’s non-blank value.
- Force re-evaluation of the filter each time a drop-list or the search field changes its value.
That’s a brief summary that almost certainly makes zero sense at this point, but I suggest you check out the Live sample in the facet filters post I referenced above and read through the documentation describing how it works. The above should make sense after that.
I’ve adapted the strategy to use drop-lists and search-field facets (instead of grouped check-box facets) in the sample file below. A Google search led me to this fake data - I did not type it in!
Preview
File: facet_filters_with_droplists_and_predictive_search.rp (75.2 KB)