Is it possible to have the "Limit to active filters" option without "Limit to result set?"

Or "Limit to result set except for this filter"?

When I make a choice of one filter, I want it to filter out the other options available, not its own options.

Example: say I have two exposed filters: "product type" and "country of origin". If I select "wingnut" from product type and the only wingnuts I have are made in Argentina and Sweden, I want my select list for "country of origin" to be limited to Argentina and Sweden. Views Filters Selective does that. Yay!

However, if I leave "product type" as "all" and select "Argentina" as "country" I don't want my select list for "country" to be limited to "Argentina." I want to be able to select other options without going back to "All". The feature I want is "Limit to result set defined by filters other than itself". Is this possible with VFS as it stands?

Comments

infojunkie’s picture

I've received this feature request before, but I think it's still ambiguous.

What happens when you set "product type" to "wingnut" ? You would expect "product type" to contain all values and "country" to be limited to those containing "wingnut". So really, "Limit to result set defined by filters other than itself" should be a global setting that says "Limit to result set defined by filters other than the last filter set". Right? And what happens with > 2 filters, or when a user modifies > 1 filters at once?

I don't mind working on this because I see the value, but I need a complete picture of the behaviour.

smscotten’s picture

Thank you! Lets see, yes. If I select "Sweden" from Countries, I expect all the other countries to remain in the list, but the Products list be limited to those from Sweden.

If then I select "wingnut" from products with Sweden still selected, I expect the Country list to be limited to countries that have wingnuts and the product list to be limited to products from Sweden. That is, if both of the fields are set to "Limit to result set except for this filter"

I hadn't considered multiple filters on the same term, but I don't see that there would be a problem unless there were two *exposed* filters. Off the top of my head, two exposed filters on the same taxonomy term sounds like a horribly bad idea anyway. Am I wrong?

If a user modifies multiple filters at once (that hasn't come up for me because I use Filter Auto Submit) there is the danger that they could have mutually exclusive options and then nothing in either field, sure. I think the solution for that would be either make the "Limit to result set except for this filter" only available if "Optional" is specified (so that the user could always go back to "Any" or (perhaps simpler) to revert to the full list if the list comes up empty.

So I select "Sweden" and "enchiladas" and hit submit. There are no enchiladas from Sweden in my catalog. The country list is back to all countries and the product list shows all products.

I don't see this as limit to the result set defined by filters other than the last filter set. I'm not sure it matters what sequence the filters are chosen in. My preferred behavior is that each list be limited only by the other filters, not by itself.

Choosing an option should never prevent the user from changing that option subsequently. With the current behavior, changing an option always prevents the user from changing that option a second time.

Have I missed some possibilities or use cases?

pmcmonagle’s picture

I need this functionality yesterday, so I'm posting this as much for my own reference - I'm going to try an hack it in myself tonight.

I'll list some pretend results with three arbitrary values that could be filtered by: Numbers, Letters Symbols.
eg. We'll say that ITEM-1-A-! is an item with the field "Numbers" set to "1", "Letters" to "A" and "Symbols" to "!"

User has no filters set:
Results: ITEM-1-A-!, ITEM-1-B-@, ITEM-2-A-#, ITEM-2-C-!, ITEM-3-B-#
Numbers Filter: 1, 2, 3
Letters Filter: A, B, C
Symbols Filter: !, @, #

In our first scenario, we determine available filters by looking at the results of each filter individually

User filters by 1:
Results: ITEM-1-A-!, ITEM-1-B-@
Numbers Filter: 1, 2, 3
Letters Filter: A, B
Symbols Filter: !, @

User filters by A:
Results: ITEM-1-A-!, ITEM-2-A-#
Numbers Filter: 1, 2
Letters Filter: A, B, C
Symbols Filter: !, #

User Filters by !:
Results: ITEM-1-A-!, ITEM-2-C-!
Numbers Filter: 1, 2
Letters Filter: A, C
Symbols Filter: !, @, #

User filters by "1" AND "A":
Results: ITEM-1-A-!
Numbers: 1, 2 (based on result of "A")
Letters: A, B (based on result of "1")
Symbols: !

User Filters by "1", "A", "!"
Results: ITEM-1-A-!
Numbers: 1, 2 (based on result of "A" and "!")
Letters: A (based on result of "1" and "!")
Symbols: ! (based on result of "1" and "A")

In our second scenario, we determine available filters based on their ORDER (weight) within the view
eg. Numbers will filter Letters and Symbols, but not itself. Letters will only filter Symbols

User filters by 1:
Results: ITEM-1-A-!, ITEM-1-B-@
Numbers Filter: 1, 2, 3
Letters Filter: A, B
Symbols Filter: !, @

User filters by A:
Results: ITEM-1-A-!, ITEM-2-A-#
Numbers Filter: 1, 2, 3
Letters Filter: A, B, C
Symbols Filter: !, #

User filters by "1" and "A":
Results: ITEM-1-A-!
Numbers Filter: 1, 2, 3
Letters Filter: A, B (based on result of "1")
Symbols Filter: ! (based on result of "1" and "A")

User filters by "A" and "!":
Results: ITEM-1-A-!
Numbers Filter: 1, 2, 3
Letters Filter: A, B, C
Symbols Filter: !, # (based on result of A)
tngcas’s picture

I need this functionality as well. It is ambiguous and hard to define however.

Has anyone ever made any progress with this?

IamOnStage’s picture

I too would greatly benefit from this functionality.

If you could limit values of the result set to a particular filter. The description in the exposed form options says:

"If checked, the items presented to the user will be further restricted according to the values of all active exposed filters"

What would help would be:

"the items presented to the user will be further restricted according to the values of ▼Select Specific Filter active exposed filters.

danielnolde’s picture

This is still valid - how is this looking in the D7 version? Any info / statement by the maintainer??

infojunkie’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

This module is no longer maintained for D6 and has been deprecated in favour of https://drupal.org/project/views_selective_filters for D7. Please test there and reopen if necessary.