Answers.Body: <p>You are close.
  Add a Contact A relationship and use  CiviCRM Relationship (starting from contact A).</p>
  
  <p>Add both Display Names fields.</p>
  
  <p>In filters, add CiviCRM Relationships: Contact ID B and set it to empty.</p>
  
  <p>Here is a copy of a view of CiviCRM Cases.
  <a href="https://i.sstatic.net/G9Hlj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/G9Hlj.png" alt="Empty Case Role View"></a></p>
  
  <p>And a pic of the filter:
  <a href="https://i.sstatic.net/7KZro.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7KZro.png" alt="Empty Case Role Filter"></a></p>
  
  <p><strong>Update to solve multiple cases:</strong></p>
  
  <p>To solve the folks with multiple case types issue, I created this page view but filtered for only one case type.  I then added attachments to the view page for all other case types. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T19:45:06.170Z
Answers.Text: I'm afraid this isn't working for me. It is still excluding any case with a client who has multiple cases where any one of them has a manager.
Answers.UserDisplayName: Squishus Tyrannicus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T20:23:34.933Z
Answers.Text: You can read some of the issues about multiple cases here: http://civicrm.stackexchange.com/questions/3032/if-contact-has-multiple-cases-how-do-i-filter-a-view-to-show-only-case-roles-as
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T21:03:04.713Z
Answers.Text: Thanks for the hint. I may be barking up the wrong tree, here. Seems like manipulating views to do what I want it to do here might be about as much work as just writing a custom block to do what I want it to do... Will have to bang my head against it some more. Thanks again!
Answers.UserDisplayName: Squishus Tyrannicus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T21:11:11.107Z
Answers.Text: No, it's pretty easy.  The only downside is I had to create an attachment for each case type.
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-26T00:56:28.163Z
Answers.Text: Updated answer above for multiple case types.
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-02T18:20:26.513Z
Answers.Text: I'm just going to approach this in a different way. Thanks for your assistance.
Answers.UserDisplayName: Squishus Tyrannicus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-03T11:25:09.207Z
Answers.Text: No problem. Please share whatever you come up with.
Answers.UserDisplayName: pmoz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T14:41:23.567Z
Answers.LastActivityDate: 2015-11-26T00:56:10.940Z
Answers.LastEditDate: 2015-11-26T00:56:10.940Z
Answers.UserDisplayName: pmoz
Body: <p>I'm using CiviCRM 4.6.9, if it makes a difference.</p>
  
  <p>I want to use Drupal Views to display only CiviCase cases that <em>do not</em> have case managers.</p>
  
  <p>I feel as though I'm close... so close, but I'm not quite there yet. This is what I have set up.</p>
  
  <p>I have a view that displays cases in a table format. I've add a <em>subject</em> field and a <em>contact</em> field to the view. I then added <em>CiviCRM Case Contact: Case Contact's ID</em> as a relationship, and to that I've added <em>CiviCRM Contacts: CiviCRM Relationship (starting from contact A)</em> which is set to use only the case manager relationship type, but is not required.</p>
  
  <p>For filters, I've added <em>(CiviCRM Relationship (starting from contact A)) CiviCRM Relationships: Case ID (empty)</em>.</p>
  
  <p>This <strong>almost</strong> works as I want it to. However, if a single client has multiple cases, and any one of those cases is assigned a case manager, none of their other cases will show up. I think this happens because the relationship is fetched via the clients ID number and not via the case ID, though as far as I can see, there are no views relationships that will allow me to  fetch a case relationship via the case ID.</p>
  
  <p>I can supply more information if needed.</p>
  
  <p>Any help is greatly appreciated.</p>
  
Tags: <civicase><drupal-views><relationships>
Title: How can I display only Cases without Case Managers using Drupal Views
ThreadText: # How can I display only Cases without Case Managers using Drupal Views
  
  (Asked by: username_0 on 2015-11-25)
  
  I'm using CiviCRM 4.6.9, if it makes a difference.
  
  I want to use Drupal Views to display only CiviCase cases that *do not* have case managers.
  
  I feel as though I'm close... so close, but I'm not quite there yet. This is what I have set up.
  
  I have a view that displays cases in a table format. I've add a *subject* field and a *contact* field to the view. I then added *CiviCRM Case Contact: Case Contact's ID* as a relationship, and to that I've added *CiviCRM Contacts: CiviCRM Relationship (starting from contact A)* which is set to use only the case manager relationship type, but is not required.
  
  For filters, I've added *(CiviCRM Relationship (starting from contact A)) CiviCRM Relationships: Case ID (empty)*.
  
  This **almost** works as I want it to. However, if a single client has multiple cases, and any one of those cases is assigned a case manager, none of their other cases will show up. I think this happens because the relationship is fetched via the clients ID number and not via the case ID, though as far as I can see, there are no views relationships that will allow me to fetch a case relationship via the case ID.
  
  I can supply more information if needed.
  
  Any help is greatly appreciated.
  
  **Tags:** civicase, drupal-views, relationships
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-25. Score: 2
  
  You are close.
  Add a Contact A relationship and use CiviCRM Relationship (starting from contact A).
  
  Add both Display Names fields.
  
  In filters, add CiviCRM Relationships: Contact ID B and set it to empty.
  
  Here is a copy of a view of CiviCRM Cases.
  [![Empty Case Role View](https://i.sstatic.net/G9Hlj.png)](https://i.sstatic.net/G9Hlj.png)
  
  And a pic of the filter:
  [![Empty Case Role Filter](https://i.sstatic.net/7KZro.png)](https://i.sstatic.net/7KZro.png)
  
  **Update to solve multiple cases:**
  
  To solve the folks with multiple case types issue, I created this page view but filtered for only one case type. I then added attachments to the view page for all other case types.
  
  > **Comments:**
  > **username_0**: I'm afraid this isn't working for me. It is still excluding any case with a client who has multiple cases where any one of them has a manager.  
  > **username_1**: You can read some of the issues about multiple cases here: http://civicrm.stackexchange.com/questions/3032/if-contact-has-multiple-cases-how-do-i-filter-a-view-to-show-only-case-roles-as  
  > **username_0**: Thanks for the hint. I may be barking up the wrong tree, here. Seems like manipulating views to do what I want it to do here might be about as much work as just writing a custom block to do what I want it to do... Will have to bang my head against it some more. Thanks again!  
  > **username_1**: No, it's pretty easy.  The only downside is I had to create an attachment for each case type.  
  > **username_1**: Updated answer above for multiple case types.  
  > **username_0**: I'm just going to approach this in a different way. Thanks for your assistance.  
  > **username_1**: No problem. Please share whatever you come up with.  
  
  ---
  
  