Answers.Body: <p>I am not sure from the question whether each relationships is connected to the original contact, or if some might be daisy chained eg
  Parent to Student to School etc. In case it is the latter, here is a snip from an old forum post which might help</p>
  
  <p>CONNECT A to B</p>
  
  <p>Add DV relationship 1 of type "Connects a contact (as contact A) to a relationship." (eg employer of)</p>
  
  <p>Add DV relationship 2 of type "The contact B" use DV 1 as the 'Relationship'</p>
  
  <p>So you have now connected person X to Org Y</p>
  
  <p>CONNECT B to C</p>
  
  <p>Add DV relationship 3 of type "Connects a contact (as contact A) to a relationship." (eg Primary Contact of) - use DV 2 as the 'Relationship'</p>
  
  <p>Add DV relationship 4 of type "The contact B" use DV 3 as the 'Relationship'</p>
  
  <p>OUTCOME</p>
  
  <p>So now you should have connected person X to Org Y and then Org Y to person Z.</p>
  
  <p>etc</p>
  
  <p>ANOTHER EXAMPLE might be if you want to show grandchildren where you have multiple parent-child relationships including some 2 level situations.</p>
  
  <p>so Person A is Parent of Person B, and Person B is Parent of Person C</p>
  
  <p>Hence Person A is 'grandparent' of Person C</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-05T00:20:54.733Z
Answers.Text: In the paragraph beginning "Add relationship 3..." When you say "Add relationship 2 of type...", was that meant to read "Add relationship 4 of type...", rather than 2?
Answers.UserDisplayName: Lewis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-05T00:27:25.987Z
Answers.Text: When adding fields to a view like this, how do you distinguish between "person X" and "person Z"?  How do you pick one or the other as they would appear to be in the 'same' relationship to Contact B?
Answers.UserDisplayName: Lewis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-05T00:35:41.573Z
Answers.Text: How would this arrangement change if I defined the relationships in CiviCRM differently? Say, person X is Contact B and Org Y is Contact A for that relationship, but person Z is Contact A and Org Y is Contact B for the second relationship?  Will that simply not work in Views?
Answers.UserDisplayName: Lewis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-05T07:39:59.160Z
Answers.Text: I have edited above and added DV to clarify which are Drupal View relationships, v Civi relationships.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-05T07:43:13.500Z
Answers.Text: Lewis. V hard to answer your very specific questions without seeing the details of your structure. But we have done very complex daisy chaining so would have to assume what you are wanting 'is' possible until proven otherwise
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-23T20:26:25.780Z
Answers.LastActivityDate: 2016-10-05T08:04:31.257Z
Answers.LastEditDate: 2016-10-05T08:04:31.257Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>This is an update to the answer given by <a href="https://civicrm.stackexchange.com/users/96/petednz-fuzion">petednz - fuzion</a>. In my case I needed to create a view which showed a list of all employees of the organisation employing the currently logged in employee. In other words if a contact is logged into the website (Drupal), they can see the details for their organisation and all the employees of their organisation. </p>
  
  <p>I followed the steps given in the answer by petednz, but this didn't work for me. I needed to adjust his section when connecting B to C to get it to work. The steps I followed were:</p>
  
  <ol>
  <li>Create user view</li>
  <li>Create relationship from user to CiviCRM contact (to create link from current Drupal user to their Civi contact details)</li>
  <li>Add Current User to filters (to only show information for logged in user)</li>
  <li>Create relationship for CiviCRM Relationship (starting from contact A)</li>
  <li>Create relationship: CiviCRM Relationships: Contact ID B (4 &amp; 5 connects currently logged in user to organisation)</li>
  <li>Create relationship: CiviCRM Relationship (starting from Contact B)</li>
  <li>Create relationship: CiviCRM Relationships: Contact ID A (6 &amp; 7 now shows all employees connected to the organisation shown in step 5)</li>
  </ol>
  
  <p>To show fields relating to the currently logged in user use the relationship defined in step 2. </p>
  
  <p>To show fields relating to the organisation, use the relationship defined in step 5. </p>
  
  <p>To show fields relating to the employees of the organisation, use the relationship defined in step 7.</p>
  
  <p>The difference between my answer and petednz's answer is that when he is connecting B to C, he creates the CiviCRM Relationship (starting from Contact A), and I use the CiviCRM Relationship (starting from Contact B), and then he creates the CiviCRM Relationships: Contact ID B, and I create the CiviCRM Relationships: Contact ID A. </p>
  
  <p>I have created an <a href="http://www.benmango.co.uk/sites/default/files/Current%20User%20Employer%20Employees%20View.txt" rel="noreferrer">export of my view</a> which demonstrates the answer.</p>
  
  <p>It should then be possible to create one part of the view to show the organisation details and then an attachment view to show the employees to tidy things up. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-13T18:36:02.407Z
Answers.Text: Thanks Ben, not sure if i tripped over my own logic at some point writing it up, or simply that the Relationship B-A and A-B is different in the two scenarios.. Providing an export is a really good idea. I try to do the same at our Treasure Trove: https://www.fuzion.co.nz/treasure-trove
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-14T07:14:51.207Z
Answers.Text: Thanks petednz for the link to your treasure trove, that is a very helpful resource!
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-13T10:39:20.433Z
Answers.LastActivityDate: 2017-10-13T10:39:20.433Z
Answers.UserDisplayName: Ben
Answers.Body: <p>You can use the relationship section of a view for this. A relationship in a view is a relationship between entities don't confuse it with the relationship you have between contacts.</p>
  
  <p>So you could set up a view relationship starting from contact a (the a side of the civicrm relationship), or from contact b (the b side of the civicrm relationship). This a link to the civicrm relationship entity. When you add this relationship to the view you can define which civicrm relationship type. </p>
  
  <p>The next step is to make a view relationship between the civicrm relationship entity and the contact. This relationship is called CiviCRM Contact, the Contact B, or CiviCRM Contact the Contact A. </p>
  
  <p>Then in the fields section of the view you can add fields based on the entity. You can then say for example I want to use display name of Contact B. </p>
  
  <p>If you are familiar with SQL. A view relationship could be described as a join. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-23T13:48:06.750Z
Answers.LastActivityDate: 2015-04-23T13:48:06.750Z
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Body: <p>I would like to create a Drupal View showing an organization and several individuals who are related to the organization in different relationships. The wording on the CiviCRM Drupal relationships options is ambiguous, and I am struggling to find clear documentation describing CiviCRM relationships in Drupal Views.</p>
  
  <p>How do I create a View showing several related entities linked to a common entity by distinct relationship types?</p>
  
Tags: <drupal><relationships><drupal-views><drupal-7>
Title: How to create a Drupal View with multiple CiviCRM relationships?
ThreadText: # How to create a Drupal View with multiple CiviCRM relationships?
  
  (Asked by: username_0 on 2015-04-22)
  
  I would like to create a Drupal View showing an organization and several individuals who are related to the organization in different relationships. The wording on the CiviCRM Drupal relationships options is ambiguous, and I am struggling to find clear documentation describing CiviCRM relationships in Drupal Views.
  
  How do I create a View showing several related entities linked to a common entity by distinct relationship types?
  
  **Tags:** drupal, relationships, drupal-views, drupal-7
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2015-04-23. Score: 9 | Accepted answer
  
  You can use the relationship section of a view for this. A relationship in a view is a relationship between entities don't confuse it with the relationship you have between contacts.
  
  So you could set up a view relationship starting from contact a (the a side of the civicrm relationship), or from contact b (the b side of the civicrm relationship). This a link to the civicrm relationship entity. When you add this relationship to the view you can define which civicrm relationship type.
  
  The next step is to make a view relationship between the civicrm relationship entity and the contact. This relationship is called CiviCRM Contact, the Contact B, or CiviCRM Contact the Contact A.
  
  Then in the fields section of the view you can add fields based on the entity. You can then say for example I want to use display name of Contact B.
  
  If you are familiar with SQL. A view relationship could be described as a join.
  
  
  ---
  
  ### Answer by username_1 on 2015-04-23. Score: 5
  
  I am not sure from the question whether each relationships is connected to the original contact, or if some might be daisy chained eg
  Parent to Student to School etc. In case it is the latter, here is a snip from an old forum post which might help
  
  CONNECT A to B
  
  Add DV relationship 1 of type "Connects a contact (as contact A) to a relationship." (eg employer of)
  
  Add DV relationship 2 of type "The contact B" use DV 1 as the 'Relationship'
  
  So you have now connected person X to Org Y
  
  CONNECT B to C
  
  Add DV relationship 3 of type "Connects a contact (as contact A) to a relationship." (eg Primary Contact of) - use DV 2 as the 'Relationship'
  
  Add DV relationship 4 of type "The contact B" use DV 3 as the 'Relationship'
  
  OUTCOME
  
  So now you should have connected person X to Org Y and then Org Y to person Z.
  
  etc
  
  ANOTHER EXAMPLE might be if you want to show grandchildren where you have multiple parent-child relationships including some 2 level situations.
  
  so Person A is Parent of Person B, and Person B is Parent of Person C
  
  Hence Person A is 'grandparent' of Person C
  
  > **Comments:**
  > **username_2**: In the paragraph beginning "Add relationship 3..." When you say "Add relationship 2 of type...", was that meant to read "Add relationship 4 of type...", rather than 2?  
  > **username_2**: When adding fields to a view like this, how do you distinguish between "person X" and "person Z"?  How do you pick one or the other as they would appear to be in the 'same' relationship to Contact B?  
  > **username_2**: How would this arrangement change if I defined the relationships in CiviCRM differently? Say, person X is Contact B and Org Y is Contact A for that relationship, but person Z is Contact A and Org Y is Contact B for the second relationship?  Will that simply not work in Views?  
  > **username_1**: I have edited above and added DV to clarify which are Drupal View relationships, v Civi relationships.  
  > **username_1**: username_2. V hard to answer your very specific questions without seeing the details of your structure. But we have done very complex daisy chaining so would have to assume what you are wanting 'is' possible until proven otherwise  
  
  ---
  
  ### Answer by username_3 on 2017-10-13. Score: 5
  
  This is an update to the answer given by [username_1 - username_1](https://civicrm.stackexchange.com/users/96/username_1). In my case I needed to create a view which showed a list of all employees of the organisation employing the currently logged in employee. In other words if a contact is logged into the website (Drupal), they can see the details for their organisation and all the employees of their organisation.
  
  I followed the steps given in the answer by username_1, but this didn't work for me. I needed to adjust his section when connecting B to C to get it to work. The steps I followed were:
  
  1. Create user view
  2. Create relationship from user to CiviCRM contact (to create link from current Drupal user to their Civi contact details)
  3. Add Current User to filters (to only show information for logged in user)
  4. Create relationship for CiviCRM Relationship (starting from contact A)
  5. Create relationship: CiviCRM Relationships: Contact ID B (4 & 5 connects currently logged in user to organisation)
  6. Create relationship: CiviCRM Relationship (starting from Contact B)
  7. Create relationship: CiviCRM Relationships: Contact ID A (6 & 7 now shows all employees connected to the organisation shown in step 5)
  
  To show fields relating to the currently logged in user use the relationship defined in step 2.
  
  To show fields relating to the organisation, use the relationship defined in step 5.
  
  To show fields relating to the employees of the organisation, use the relationship defined in step 7.
  
  The difference between my answer and username_1's answer is that when he is connecting B to C, he creates the CiviCRM Relationship (starting from Contact A), and I use the CiviCRM Relationship (starting from Contact B), and then he creates the CiviCRM Relationships: Contact ID B, and I create the CiviCRM Relationships: Contact ID A.
  
  I have created an [export of my view](http://www.benmango.co.uk/sites/default/files/Current%20User%20Employer%20Employees%20View.txt) which demonstrates the answer.
  
  It should then be possible to create one part of the view to show the organisation details and then an attachment view to show the employees to tidy things up.
  
  > **Comments:**
  > **username_1**: Thanks Ben, not sure if i tripped over my own logic at some point writing it up, or simply that the Relationship B-A and A-B is different in the two scenarios.. Providing an export is a really good idea. I try to do the same at our Treasure Trove: https://www.username_1.co.nz/treasure-trove  
  > **username_3**: Thanks username_1 for the link to your treasure trove, that is a very helpful resource!  
  
  ---
  
  