The selective exposed filter currently works on the current filter as well.

So if I have a filter for country and gender, I select male, and the United States, this gives me a list of males in the United States. Unfortunately all other options would disappear, females and other countries, and there would be no way to change the filter.

What should happen is that the selective filters should exempt the current filter, so if I select male and united states, if there are females in the united states, the female option in the selection should still be visible even if there are no females in the current view. This way, I can change my filters to get a different view without having to reset.

Comments

ManyNancy’s picture

Title: Selective Exposed Filters ignore current filter » Usability: Selective Exposed Filters exempt self filter
infojunkie’s picture

Does that happen when you use option "Limit list to result set" without "Further limit list to active filters"?

derhasi’s picture

I could observe a similar problem. It's caused by using two filters of type taxonomy term. So both filters try to fetch data from {term_node}.tid. But if there is an argument, that restricts the view to only {term_node}.tid = 5. There are no more results returned in the result set for the other vocabulary.

ManyNancy’s picture

Does that happen when you use option "Limit list to result set" without "Further limit list to active filters"?

No it doesn't happen, but the functionality of Further limit list to active filters is what I'm looking for. Limit list to result set by itself doesn't limit anything for me.

Thanks.

infojunkie’s picture

What should happen is that the selective filters should exempt the current filter, so if I select male and united states, if there are females in the united states, the female option in the selection should still be visible even if there are no females in the current view.

What's your definition of "current filter" ? What if I want to see only males in all countries - I would expect the country filter to be exempted ?

ManyNancy’s picture

Sorry, the current filter is a confusing term. I mean the SELF filter. If I select any country now, the entire country filter options list drops down to 1. This makes the filter useless from that point on, I would have no ability to change to another country.

Only the gender filter should affect the country filter. If I select male, and there are no males in Spain, but there are males in France, then the Spain option should not appear in the filter. This is the current behavior and it is good (as far as filtering countries goes by selecting gender). But I am talking about the SELF filter. If I selected males, then the female option would disappear, meaning I would have no way to change what gender I'm filtering by without resetting.

This is more pronounced when you have a big filter options list, like countries. When I select a single country, all the other countries in the list disappears, then limiting me to only this country. Obviously this should happen in the view, but in the filters options the other countries should remain, allowing me to jump from males in France to males in the UK to males in the US. The only options removed should be countries which have no males in them.

derhasi’s picture

The self filter seems to be a difficult point, as you need to know exactly how it works, so there's not much of intentional behaviour, and there is no opportunity of really configuring it. Faced with these problems, I "forked" the module as mentioned in #817426: Views Filter Options by View - additional module. That is configurable by setting up a view to fetch the data from. Maybe this could help to fix your problems. As this "fork" might get into views_hacks, it should be regarded as a patch to review.

ManyNancy’s picture

Yes, it does seem like creating another view is the only way to get around the lack of fields to grab options from, seeing as how the filters current work in this module.

Some questions though. Does this other view work automatically? Or do I have to manually create it? Will it keep up and update in the background while I change the filters?

Thank you very much too.

derhasi’s picture

For the fork module, you need to build a view manually, as building it automatically would deal with the same problems the current module has to - it's most times hard to guess the correct field and joins, especially with multiple instances/relations.

For further question on the fork module, please use #817426: Views Filter Options by View - additional module.

roball’s picture

Component: Code » Views Filters Selective
infojunkie’s picture

The issue of using another view to restrict the filter values is now closed. I found a simpler, alternate way to get the same functionality.

But I'm still not sure how to address the current issue of exempting the "self" filter from being limited. My main problem is how to define "self" at any time. Is it the last modified filter for example? What happens if the user modified more than one at the same time?

dreamer777’s picture

infojunkie, do you have any news on the issue? maybe some input is needed?

PedroKTFC’s picture

I'm trying to use BEF with Selective Exposed Filters with Drupal Commerce to filter my list and frankly I am getting completely confused as to what should happen. It certainly isn't giving me what I want! I (will!) have a site selling various items of clothing and I want the user to be able to filter by brand (amongst other things). However, the list of brands will vary by item type but also by what's in stock so I want the user to be presented with a list of brands only appropriate for that item type at that time as a series of checkboxes. And I want the list to be static so the user can select as many as she wants and keep changing it, adding and removing brands as she wants.

But I don't get anything like this. Should I? If not, is there any prospect of this being provided as an option?

Note I'm using Drupal 7.

IamOnStage’s picture

Subscribing.

The selective exposed filters need not filter themselves. What I think will solve everyone problems is being able to set a hierarchy on the exposed filters.

So the selective exposed filters only react to a particular filter or group of filters.

srgk’s picture

subscribing

danielnolde’s picture

Any news on this or 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.