- Issue created by @Thony
- πΊπΈUnited States lisastreeter
@Thorny - I'm using a Zone field for customer "tax exemption documents" so that I can match them up with customer shipping addresses. For the vast majority, admins are just entering one or more US states for the Zone value.
I was just asked to add "State" as a Views filter for the tax-exemption listing and found this issue when I went searching for a solution.
Creating a proper views filter for a zone also seems extremely difficult (or impossible) to me. So...I've been considering a workaround that I'll describe here in case you could do something similar for your "postal code" filter needs.
* Add a multiple value text field for "States" to tax exemption document entities. (do not display on entity form/display)
* On entity save/update, extract the "administrative area" for each zone territory and save it to the States field.
* Add Views filter for that States field. Admin users will simply type the 2-character state abbreviation. (All exemptions are U.S.)If you only have "included postal codes", perhaps you could do the same, parsing the values into a multi-value text field on entity save. And then use the "Regular expression" operator for the Views filter.
Then again, perhaps creating a custom field as you suggest would be a better/cleaner solution.