1

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.

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

And a pic of the filter: Empty Case Role Filter

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.

  • 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. – Squishus Tyrannicus Nov 25 '15 at 19:45
  • You can read some of the issues about multiple cases here: civicrm.stackexchange.com/questions/3032/… – pmoz Nov 25 '15 at 20:23
  • 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! – Squishus Tyrannicus Nov 25 '15 at 21:03
  • No, it's pretty easy. The only downside is I had to create an attachment for each case type. – pmoz Nov 25 '15 at 21:11
  • Updated answer above for multiple case types. – pmoz Nov 26 '15 at 0:56

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.