Answers.Body: <p>Ok, once again I should have looked more carefully at the suggested answers</p>
  <p><a href="https://civicrm.stackexchange.com/questions/3032/if-contact-has-multiple-cases-how-do-i-filter-a-view-to-show-only-case-roles-as?rq=1">If contact has multiple cases, how do I filter a view to show only case roles associated to that case type</a></p>
  <p>Start with a relationship view
  Then pull in the case id from the views relationships and filter on the case type, relationship type and is the relationship active</p>
  <p>And then bring in the related contacts</p>
  <p>Thanks @pmoz and @ehommel</p>
  <p><a href="https://i.sstatic.net/juS72.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/juS72.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-30T17:12:57.743Z
Answers.LastActivityDate: 2021-03-30T17:12:57.743Z
Answers.UserDisplayName: Craig Almond
Body: <p>I'm setting up a vew of cases of type &quot;x&quot; and using views relationships to pull in cases relationships such as &quot;Case Worker for&quot; Client- as well as client details.</p>
  <p>If, I have a client who has had more than one case with the organisation. With a number of &quot;Case Workers&quot;. how can I filter the view to only show the case relationship for the listed case?</p>
  <p>Currently will now show duplicate lines or each case, 1 per case worker.</p>
  <p>If I use views aggregator plus module, I can compress  the view down to one line per case- but it is normally the first added case worker shows not the one for the specific case.</p>
  <p>See screenshot for example- 1 client, 1 case, but 5 caseworker relationships to the client</p>
  <p><a href="https://i.sstatic.net/hBxfk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hBxfk.png" alt="case view screenshot" /></a></p>
  
Tags: <civicase><drupal-views>
Title: Drupal Views and Case Relationships
ThreadText: # Drupal Views and Case Relationships
  
  (Asked by: username_0 on 2021-03-30)
  
  I'm setting up a vew of cases of type "x" and using views relationships to pull in cases relationships such as "Case Worker for" Client- as well as client details.
  
  If, I have a client who has had more than one case with the organisation. With a number of "Case Workers". how can I filter the view to only show the case relationship for the listed case?
  
  Currently will now show duplicate lines or each case, 1 per case worker.
  
  If I use views aggregator plus module, I can compress the view down to one line per case- but it is normally the first added case worker shows not the one for the specific case.
  
  See screenshot for example- 1 client, 1 case, but 5 caseworker relationships to the client
  
  [![case view screenshot](https://i.sstatic.net/hBxfk.png)](https://i.sstatic.net/hBxfk.png)
  
  **Tags:** civicase, drupal-views
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-03-30. Score: 4 | Accepted answer
  
  Ok, once again I should have looked more carefully at the suggested answers
  
  [If contact has multiple cases, how do I filter a view to show only case roles associated to that case type](https://civicrm.stackexchange.com/questions/3032/if-contact-has-multiple-cases-how-do-i-filter-a-view-to-show-only-case-roles-as?rq=1)
  
  Start with a relationship view
  Then pull in the case id from the views relationships and filter on the case type, relationship type and is the relationship active
  
  And then bring in the related contacts
  
  Thanks @pmoz and @ehommel
  
  [![enter image description here](https://i.sstatic.net/juS72.png)](https://i.sstatic.net/juS72.png)
  
  
  ---
  
  