0

I am pretty new to drupal, so some terms I describe may not be accurate. Anyways, I know how to group things in views using single values (i.e. Group faculty members by their departments: engineering, biology, medicine, social science, etc).

I want to create a view that groups items by a field which accepts multiple value (i.e. research areas). Suppose we have the Research Areas A, B, C, and D. Then, I want to group it such that each faculty member is displayed under each value of the multi-value field. Let's also suppose there are Faculty Members John, Josh, Jack, Jasmine, and their respective research areas are as follow (Note: omitted departments):

John { research area: A, B }
Josh { research area: B, D }
Jack { research area: A, D }
Jasmine { research area: B, C }
Joyanne { research area: A, B }

Then, the view should display as follows (desired output):

Research Area A:
John
Jack
Joyanne

Research Area B:
John
Josh
Jasmine
Joyanne

Research Area C:
Jasmine

Research Area D:
Josh
Jack

---------------------------------------------------------------
I have been using fields inside each faculty member to represent the research areas they fall under (check boxes for different research areas they focus on). And I have some how grouped them using the Research Area field; however, they are grouping as such:

Research Area A, B:
John
Joyanne

Research Area B, D:
Josh

Research Area A, D:
Jack

Research Area B, C:
Jasmine

I have also used Taxonomy Vocabularies, but to no avail.

Help SVP. Thanks for your time in advance.

0

Grouping is done by the information you have in your results.

Fields with multiple values return results differently, depending on the Multiple field settings you set on them.

If you choose to Display all values in the same row then each node will show all "Research Areas" related to it, and if you enable grouping groups will reflect the option combinations from results. This is your current behavior.

If you untick the option Display all values in the same row each node will be displayed in a separate row showing only one "Research area" it belongs to, but it will be listed as many times as it has "Research areas" attached to it. When you enable grouping in this scenario each "Research area" option will behave "independently".

So to achieve your desired behavior you need to untick the option Display all values in the same row on your "Research Areas" Field (mind you this is under Fields, and not under Format where Grouping options are).

  • Thank you so much! That solved it! :( was stuck on it for quite a while. – Kokonut.ky Aug 21 '18 at 23:03
  • I'm glad to help! Don't forget to mark as accepted if it did answer your question adequately :) – prkos Aug 21 '18 at 23:08

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.