I need to get a list of Volunteers (contacts) who DON'T have a supervisor (relationship) ...I've tried Advanced Search and looking for relationships, and I've just tried Search Builder. I can put the ones who DO in a smart group, but can't find a way of putting the ones who don't...Help!
CiviCRM is good at doing searches for a "negative" when it's, "find an empty field"; you can use Search menu » Search Builder for that. However, for finding whether someone is missing an Activity, Relationship, etc. you need a custom search. By default, CiviCRM has such a custom search for groups and tags, but not relationships.
Until someone writes that search, here's the workaround:
- Do a search with no criteria, which will return all your contacts. Create a smart group from this search called "All Contacts".
- Do an Advanced Search for folks that DO have the supervisor relationship. Create a second smart group called "Volunteers with Supervisors".
- Note: If not ALL of your contacts are volunteers, then modify both of the searches above to only search the "Volunteers" group.
- Go to Search menu » Custom Searches.
- Click Include / Exclude Search. On older versions of CiviCRM, this is called, Include/Exclude by Group/Tag.
- For "Include Groups", select "All Contacts". For "Exclude Groups", select "Volunteers with Supervisors".
The search result you get back is the list of "All Contacts" minus "Volunteers with Supervisors" - which should be volunteers without supervisors. You can create a smart group out of it so that less data-savvy users can just use the new smart group to generate the list.
One way of approaching this is to split it into two searches:
B volunteers with a supervisor
Then subtracting B from A to give you volunteers without a supervisor.
If you are doing this on a one off basis, you should:
- create a group for A
- do a search for B and select remove from group from the actions menu
- remove the contacts in B from group A
Ongoing / Smart group
If you are doing this search on a ongoing basis, it makes sense to create a smart group.
- create smart groups for A and B
- create another smart group using the 'Include / Exclude Search' that can be found in Custom Searches.