I'm showing a list of members and using the address field exposed filter to filter by the member's country - works great. Thanks for adding the views support!!!!
Now it would be really cool if I had an option to only show countries where there are related nodes. In my example it would only show countries with members.

Comments

mxt’s picture

I think you can simply add the following filter to your view:

Content: Address (field_address:country)

and then choose the "is not empty (NOT NULL)" option for that filter.

This works very well in my case: your view will show only records (nodes) that have at least a value in the addressfiled field, and will omits nodes that doesn't have any value.

Hope this help.

mototribe’s picture

thx, I guess I wasn't specific enough. I want to show only countries in the exposed filter where I have matching records in the view (users instead of nodes in my example).

rszrama’s picture

Status: Active » Closed (won't fix)

Unfortunately, the way exposed filter forms are rendered, we cannot limit the options to only values found in the View results. Just think about the havoc that could play with pagination. : D

It should be possible to custom alter the form on a site-by-site basis, though, where you know what the name of the field is to check and can query the database to find country values to limit the select list to.

sachbearbeiter’s picture