I have a view that shows users. Users are associated with an Area in the organization. The view groups by Area (a vocabulary) and gives a list with nice area headings, with a list of Users inside it. Unfortunately there is one executive in the organization that is also in charge of another Area, and he needs to appear in both places. When I assign both areas to his account (entity reference field), we get the following (problematic user in bright blue):

enter image description here

What should happen, is that the blue user should appear once in the Executives area and once in the PMO area. Instead as you can see, he appears twice in his own special Executives \n PMO area. It would even be ok, if he only appeared in the Executives area here. What can I change to get this view to be nice to me?

  • When I assign both areas to his account Are you using tax term reference for this? or ??? – No Sssweat Jul 15 '16 at 8:53
  • I had to go remind myself, looks like it is an entity reference. – UltraBob Jul 15 '16 at 8:54
  • so executives is a node of some content type? – No Sssweat Jul 15 '16 at 9:01
  • No, sorry, I guess I still wasn't clear with that. Area is a vocabulary, so executive is a term, but the field is an entity reference. – UltraBob Jul 15 '16 at 9:02
  • Why is Executives shown twice? is that part of your problem? – No Sssweat Jul 15 '16 at 9:06

In your hidden entity reference field's setting in Views, scroll down to Multiple field settings and uncheck Display all values in the same row.

When grouping, the content / user will get shown twice instead of what your screenshot shows.

  • Thank you! I guess that option hadn't displayed before (I just recently allowed multiple values in that field), and it sounds like it should do the opposite of what it does. – UltraBob Jul 15 '16 at 22:34
  • And on deeper reflection I understand why that setting does what it does.. – UltraBob Jul 16 '16 at 1:51
  • Cool. And yea that default setting catches a lot of people I'd say. If you get to a point where grouping doesn't provide enough functionality, drupal.org/project/views_field_view is very powerful. Another view as fields in views. It's just a bit slow if you have a dozens or hundreds of them. – Niall Murphy Jul 16 '16 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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