1

Users on my site can create content by adding a new node of content type 'project'.

Projects are assigned to exhibitions through a drop down 'exhibition' field which is an entity reference to another content type named 'exhibition'.

Exhibitions are created by admins and each exhibition has a location field (one of three distinct values).

I would like to create a view that displays all users that have created projects for two or more locations. So that could be (for example) 5 projects for 2 exhibitions in location X and 2 projects for 1 exhibition in location Y.

Having some conceptual trouble putting the view together, any help much appreciated.

Danny.

  • 5 projects for 2 exhibitions does this mean the user didn't assign an exhibition for 3 projects? – No Sssweat Feb 20 '16 at 17:31
  • Would an integer field on the user suffice? Your question makes it sound like rules could ++ an integer if conditions were met. A view could then filter based on that. If not, it's a very interesting question. – Niall Murphy Feb 20 '16 at 18:30
  • Actually, the title of your question is pretty different to your question. Could you clarify a bit please? – Niall Murphy Feb 20 '16 at 18:37
  • '5 projects for 2 exhibitions' - for example 3 projects in one exhibition, and 2 projects in the other. – Danny Browne Feb 20 '16 at 23:20
  • Sorry have fixed the title (hopefully). An integer field combined with rules is a possibility i hadn't considered. That could possibly do it. I wil investigate that. I am using Drupal to handle applications to collaborate with a a network of galleries. It's working really well but I now want to begin to build out some views that give us some insights about people using the platform. Thanks for your advice. – Danny Browne Feb 20 '16 at 23:27
0

Got around my mental block.

  1. Created a 'Users' view.
  2. Added an 'Entity Reference: Referenced Entity' relationship.
  3. Turned on aggregation for my view
  4. Added the field I wanted to count and selected COUNT (distinct)

Working well now.

Danny.

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.