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) »
  • Selecting Households AND non-household addresses
Pages: [1]

Author Topic: Selecting Households AND non-household addresses  (Read 1511 times)

wftl

  • I’m new here
  • *
  • Posts: 28
  • Karma: 4
    • Writer and Free Thinker at Large
Selecting Households AND non-household addresses
November 10, 2008, 06:35:41 am
Okay, I'm stumped. But first things first; the site in question is running CiviCRM 2.1 on a Drupal 6.6 system.  Now, the problem. We want to do a physical mailing. In order to conserve envelopes, paper, etc, we created household records for any address where two or more people shared an address (used a nice script from Giant Robot over on http://forum.civicrm.org/index.php/topic,2735.0.html ). So far, so good. The problem is that we want to create labels (or export the information) for all households and all individuals who are NOT part of a household. Seems like this should be so simple but  ??? I am hugely perplexed. Things I have tried . . .

Since all households are tagged (and all individuals in those households), I tried Search Builder to locate all individuals NOT equal to the tag ID. Trouble is, it only returns records that have some other tag. If I create an 'everyone' tag redo the search, it finds everybody. ??? I've also looked in the Advanced search and other tried other AND/OR combinations, all of which turned up nothing useful.

I can only assume that creating physical mailings is something people do all the time and that in doing these mailings, they take advantage of pulling household records to minimize postage, etc.  How did you do it?

-- Marcel (Writer and Free Thinker at Large) Gagné

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Selecting Households AND non-household addresses
November 10, 2008, 08:29:00 am

I dont think we do a good job of allowing folks to create complex queries via search builder etc. the NOT operator follows sql semantics (and hence assumes a decent level of sql knowledge etc)

your best bet would be to write a custom search that does the below. I suspect a few other folks will also find it useful. Please publish your custom search code if you do so.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Selecting Households AND non-household addresses
November 10, 2008, 10:41:59 am
Hi Marcel - a step around we have used (a Custom Search would be soooo much better) was
- search all = Household Member of
- make smart Group

- search all = individuals
- make Group or Tag
- remove from Group/Tag those in above Smart Group (this bit needs a Cron, or update before doing a mailing!)

For mailout
- Search Build on above Smart Group, and also for the Group/Tag

I think that gives your outcome - but then not sure if Labels handle Household Name yet in 2.1?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

jeffmikels

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
Re: Selecting Households AND non-household addresses
May 11, 2010, 08:32:32 am
This method worked well for me:

1. Search for all Individuals with an active relationship of "Household Member of"
2. Create a Smart Group: "People in a Household"
3. Search for all Individuals with an active relationship of "Head of Household for"
4. Create a Smart Group: "Heads of a Household"
5. Use Search Builder to find all Individuals not in those two groups & also include all Households
6. Create a Smart Group from those results: "Households and Individuals"


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Selecting Households AND non-household addresses

This forum was archived on 2017-11-26.