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) »
  • Search by negative criteria
Pages: [1]

Author Topic: Search by negative criteria  (Read 723 times)

nancya

  • Guest
Search by negative criteria
July 20, 2010, 05:43:11 pm
I am a beginner to Civi and have a question re advanced searches.
Is there a way to search by negative criteria? (as an ordinary user with no special technical skills)
I would like to create a smart group for members for whom we have no mailing address so I could email them to ask for addresses.
Thanks, Nancy!

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: Search by negative criteria
July 20, 2010, 07:03:05 pm

IMO, CiviCRM does not have very good support for negative / null searches (a code contribution or sponsorship to help improve this would definitely be appreciated)

Your best bet might be to check if "Search Builder" does what you need

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

nancya

  • Guest
Re: Search by negative criteria
July 20, 2010, 07:44:51 pm
Thanks!
I produced a no-mailing-address list by searching for "individual""street address" "Primary" "is null"

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: Search by negative criteria
July 21, 2010, 12:55:56 pm
In general, many negative searches or "does not" searches can be accomplished by using a special search located here:

http://<your-domain>/civicrm/contact/search/custom?csid=4&reset=1

By using this search you can include certain groups and then EXCLUDE other groups, thereby getting you the results you need.

For instance:

Include group "People who made a donation in 2009"
Exclude group "People who made a donation in 2010"

The result: "People who gave last year but haven't yet given this year"

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) »
  • Search by negative criteria

This forum was archived on 2017-11-26.