I'm building an employee directory in Views and running into some trouble combining fields.

Each employee has two fields: Primary Department and Secondary Department.
For Department X, I'd like to display all employees who have "Department X" listed in *either* Primary or Secondary Department.

I can get this working fine if I filter on one or the other field. However, when I try to combine Primary and Secondary fields by using Global: combine fields filter on Primary and Secondary department, only records which match in the Secondary department show. If do an Or filter on Primary and Secondary Department, I get the same result. I've even tried rewriting Primary Department to include Secondary Department as a token, then filter by Primary; no results. I've checked the data and I know the data I'm trying to filter by is available in the fields.

Additionally, sometimes the "OR" disappears from the Views UI after I've saved. Then, it shows up again later. Very strange.

I'm trying to figure out if I'm misunderstanding the Global: combine fields filter and And/Or filter functionality, or if my View is just broken. Any help you can provide would be appreciated...I'm really tearing my hair out over this one!

Comments

mizvalentine13’s picture

I can post the export of the view if that's helpful, I'm just not sure if that's best practice here.

ezman’s picture

I had a similar problem the other day and found your post when searching for a solution.

Are you trying to search on a custom text field?
I was trying to do so, but the combine filter works directly on the database by adding to the WHERE clause, and I wasn't spotting the DB error message that was complaining about a missing column 'none'.

Once I removed my custom text field from the fields to search then I found the combine filter started working.

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)