CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Searching for contacts who are NOT household members
Pages: [1]

Author Topic: Searching for contacts who are NOT household members  (Read 1226 times)

jackaponte

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Searching for contacts who are NOT household members
February 10, 2010, 02:08:50 pm
Anyone know whether there's a way to search for all contacts who are NOT members of a household? More broadly put, I'm looking for ways to search for people who are NOT in certain relationships with any other contact.

Advanced Search let me search for all contacts who ARE members of a household, but not the reverse, and I can't find any way to search relationships using Search Builder. I know that I can write a custom search for this, but want to double check that there's not another way before I do that.


jackaponte

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Re: Searching for contacts who are NOT household members
February 10, 2010, 03:14:38 pm
With Dave Greenberg's help in IRC, I'm able to give an answer two my own quesiton.

1) Using Advanced Search, I expanded the Relationships section, chose "Household Member of" from the "Relationship Types" dropdown menu (we don't use "Head of Household of" so I didn't need to worry about that), then clicked the "Search" button.
2) On the results page, I selected all records, chose "New Smart Group" from the "more actions" dropdown menu, and clicked Go.
3) I named my Smart Group "People in Households" and saved it.
4) From the CiviCRM menu bar I selected Search >> Custom Searches to get the full list of custom searches (not all are shown in the pop-up menu!) and clicked on "Include / Exclude Contacts in a Group / Tag."
5) I found my new smart group in the "Exclude Group(s)" box, selected it and clicked "Add," then clicked the "Search" button.

Voila - the search results yielded all contacts who are not members of households!

Hope this helps someone else out there; obviously it can be adapted for different relationships, not just households.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Searching for contacts who are NOT household members
April 08, 2010, 03:17:12 pm
This is such an awesomely cool and little-known feature.  Thanks both of you.

I wanted to elaborate on this process that you can combine two Smart Groups in to a "Really Smart Group" using this Include/Exclude search page here:

https://www.YOUR-SITE.org/civicrm/contact/search/custom?csid=4&reset=1

For instance, someone recently wanted to know who all their Donors are.  So we created Smart group called Donors which is any Contact with any Contribution type = Donation.

Then we created another Smart Group called Members which includes all Contacts with any membership type of "Current" status.

By then using the above link, we INCLUDED "Donors", EXCLUDED "Members" and we have a new "Really Smart Group" of all our donors who are not YET members.

Neato!
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Searching for contacts who are NOT household members

This forum was archived on 2017-11-26.