When I add field in view -> content: store locator address (screenshot 1) and go for global: combine fields filter (exposed) ( screenshot 2 ) and selecting store locator address, whenever I search something in ( postal code, city, thoroughfare ). output is nothing :-(, but if I search something like "US" / "IN" result comes for locations in US or INDIA. when i saw the query I fount it takes only "gsl_addressfield_country" from table "field_data_gsl_addressfield". It should take all the fields like gsl_addressfield_administrative_area, gsl_addressfield_thoroughfare, gsl_addressfield_postal_code. Someone help.

I want to create a view block which will list all of our store locations and will search them by having exposed global combined filter. It should search all stores by the search keywords. ( Search keywords should be searched in ANY column in field_data_gsl_addressfield table.)

Thanks in advance

Comments

semiaddict’s picture

I'm having the same issue trying to setup an exposed views filter that would filter on all (or some) of the address field parts.
Does anyone have a workaround for this ?

Thanx.

rszrama’s picture

Title: exposed filter searches the only field "gsl_addressfield_country" » Add support for multi-column fields in the Views "Combine fields filter" instead of just using the single column "real field"
Category: bug » feature
Priority: Major » Normal
Status: Active » Closed (won't fix)

This original support request is specifically for using the "Combine fields filter", a feature of Views that I didn't even know existed until now. : P

Looking at the code, that particular filter only works against a single column "real field" of whatever field you've selected. In field.views.inc, we find this code:

    $keys = array_keys($field['columns']);
    $real_field = reset($keys);

So basically, the default Field integration for Views selects the first column of a multi-column field schema and uses that as the "real field" value, which in turn is used by the "Combine fields filter". This the country code for Address Fields.

If you want to use this functionality with Address Fields, you should search for an existing feature request in the Views issue queue to make this filter work with multi-column fields. If one doesn't exist, feel free to move this one there and re-open it.

mccrodp’s picture

Project: Address Field » Views (for Drupal 7)
Version: 7.x-1.x-dev » 7.x-3.x-dev
Component: User interface » Code
Issue summary: View changes
Status: Closed (won't fix) » Active

Any suggestions how I would go about patching this to provide search over multiple columns, any similar handlers to refer to code-wise, etc.?