I'm working on a Drupal 7 site that shows the projects done by the researchers in an organization. The Projects content type has a field collection of researcher first, researcher last and role. The role is important because some researchers are the primary researcher and others take a more supporting role. These are not roles in the sense of Drupal user roles, but roles that are internal to the organization. Roles are a taxonomy with a term reference in the field collection.

There are two filters needed: 1. A filter by last name no matter what the role 2. A filter by last name where the role is primary researcher

I found this resource, which got me started: http://drupalcampnj2014.drupalcamp.org/sites/default/files/slides/working_with_field_collections_0.pdf

I have set the view to Aggregation On and I have created a relationship with the Field Combination. But I still see no way to filter on a specific field.

  • 1
    When you say field combination, what do you mean exactly? Is it drupal.org/project/field_collection ? – rooby Aug 15 '15 at 3:59
  • You are correct. I used the wrong word. It is a field collection per the module you listed. I have edited the question. – Nora McDougall-Collins Aug 15 '15 at 18:52
  • 1
    You can filter by role. So maybe providing two filters: one as checkboxes represents roles and second filter for name. AFAIC you can use AND with filters. Did you try it? – Codium Aug 15 '15 at 19:18
  • 1
    I see that there is ambiguity in the terminology. I'm using the word "role" in a sense that is internal to the client. That is, each research project has a primary researcher, various researchers, graduate assistants, funders etc, In that case the "role" field is in a collection with the first and last name for the benefit of the data entry staff. I believe that your use of the "filter by role" applies to a Drupal role for users. – Nora McDougall-Collins Aug 15 '15 at 19:31
  • So in this case in field collection entity I'm using integer (select list) field for storing these internal roles. Creating filter for this kind of field is not a problem – Codium Aug 15 '15 at 19:54

Your Answer

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

Browse other questions tagged or ask your own question.