I've been playing around with Views exposed filters on an entity. I have so far been able to create a relationship to another entity through an Entity Reference, and exposed the fields belonging to that entity.

What I needed to sort my entity by was a term reference field on the referenced entity (this is a one to many relationship, the sorted entity can have any number of reference entities). I was able to get a multiselect field to do so, but this is really not ideal. Using Better Exposed Filters I was hoping to get a checkbox list. But it seems that the nature of the relationship doesn't open that possibility up.

So the question is, if I needed a View that allowed sorting an entity by an exposed Term Reference Field filter on all of its Entity References, what method would I use, if not Better Exposed Filters?

1 Answer 1


So you have two relationships. One to the referenced entity to pull it in, and another on the term on that referenced entity to pull in data such as term names (to sort on term names).

This immediately brings to my mind an issue whereby you will have what seems like duplicate entries coming in. To avoid that you will have to use aggregation, and in the aggregation settings you will have to do a count on one of the fields (which will collapse the result set) and then do an exposed filter.

  • I turned on aggregation, then set my filters aggregation settings to COUNT, and also tested COUNT DISTINCT for good measure. It looks like it does open up a new option in Better Exposed Filters called JQuery UI Slider, but its not the UI component I'm looking for. I'm really looking for the Checkboxes/Radio Buttons component to be available.
    – jhoffmcd
    Aug 15, 2014 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.