1

I have a field that contains multiple boolean values ( similar to a tag or taxonomy term) which indicates status. So the field is like this.

application="received, data complete, references, financials," I'd like to create a tabular report grouped like this:

Received:
Item A Item C

Data Complete:
Item A Item B

References:
Item A Item B

The problem is that grouping on the field is like this: Received, Data Complete, References:
Item A

Data Complete, References:
Item B

Received:
Item B

So I need to break up the field in views. I realize I can create a view in a view or view field, but wondering if there is anything more simple/elegant.

  • To clarify - I am not using a taxonomy term (it is the same concept though) and D7 + Views 3. – Sonicthoughts Aug 5 '15 at 21:08
0

Your premises are not quite clear, but assuming that you are in a Drupal 7/Views 3 environment and that your status field leverages Drupal Taxonomy, you could achieve it in this way:

  1. Create a new view.
  2. Choose Taxonomy terms—not Content—from the dropdown list after "Show" and select your vocabulary as type.
  3. Your new view will contain Taxonomy term: Name as the only field. To get the titles of the nodes tagged with the terms of your vocabulary, first add the relationship Taxonomy term: Content using {name_of_your_vocabulary}.
  4. Then add the field Content: Title and apply the previously created relationship.
  5. Now exclude the term name field from display and select it as Grouping field in the Format settings.

This method will provide exactly the desired data structure:

data complete

Item A
Item B

received

Item A
Item C

references

Item A
Item B

You might want to adjust the order of the terms by adding term name/weight or other sorting criteria.

=======================

EDIT: If your field is not taxonomy-based but, say, a list field or any other field type capable of containing multiple values, you could get the same result along these lines:

  • Create a view on nodes, not terms.
  • Add node title and status (or whatever your field is called like) as fields.
  • Uncheck the "Display all values in the same row" feature in the status field's Multiple field settings.
  • Exclude status from display and select it as grouping field.
  • Add 'status: is not empty' as filter criterion to exclude irrelevant nodes.
  • Adjust filter and sorting criteria to your needs.
0

You can also uncheck the box "display all values in the same row" under the multiple field settings menu in the configure field settings. Doing this "denormalizes" the data. This works for both content and taxonomy terms - in my case accessed via entity reference. This way you can make the best choice between content and taxonomy in your design.

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.