Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Real world: Our not-for-profit holds monthly meetings. At each meeting, zero, one, or two people can present.

My site has:

  • Content type Presenter with fields Name and Description
  • Content type Meeting with field Date, Topic, and Node Reference (which will allow a maximum of two entries)

I created a View to show the meeting information. What I would like to see is this:

Meeting Date
Meeting Topic
Presenter 1 Name
Presenter 1 Description
Presenter 2 Name
Presenter 2 Description

What I am currently seeing is this:

Meeting Date
Meeting Topic
Presenter 1 Name
Presenter 1 Description
Meeting Date
Meeting Topic
Presenter 2 Name
Presenter 2 Description

I have tried several things to fixed this: Grouping, SQL Distinct (via Advanced->Other->Query Settings), and others, but so far, nothing has worked. This seems like something which should be easy to do - but I have yet to find the proper incantation.

Please help.

share|improve this question
add comment

1 Answer

Have you tried grouping by the node id (the same node id used in the node reference)?

share|improve this answer
 
Thank you for your reply but how do I even add a GROUP BY clause to my query? Thanks! –  cerr Jan 2 at 3:06
 
Desmond - thanks for the reply. Two responses for clarification: –  GRoston Jan 2 at 4:39
 
Desmond - thanks for the reply. I tried the following: First attempt: 1 - Added the Node ID for the content type Meeting to the list of fields 2 – Under Format->Setting->Group By, used this NID for grouping Second attempt: 1 - Added the Node ID for the content type Presenter (via the relationship) to the list of fields 2 – Under Format->Setting->Group By, used this NID for grouping Neither approach worked – did I misunderstand your suggestion? –  GRoston Jan 2 at 4:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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