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 CiviReport (Moderator: Dave Greenberg) »
  • Contacts without contributions
Pages: [1]

Author Topic: Contacts without contributions  (Read 2769 times)

betalister

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: Several
  • CMS version: Drupal, WordPress
  • MySQL version: 5.5
  • PHP version: 5.3
Contacts without contributions
August 27, 2013, 09:53:40 am
I'm having a dull day: how can I find contacts who haven't made contributions?

Thanks!

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Contacts without contributions
August 27, 2013, 12:44:11 pm
An interesting question; fundraisers would like to know what the answer is!  You could find all contributions in advanced search and then tag the contacts, then find all contacts that do not have this tag - which would be the answer.  Trouble is, search builder doesn't seem work when finding a tag that is != (not equal) to a particular tag. Any better ideas?  I hope there is an answer.
Andy Clark

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: Contacts without contributions
August 27, 2013, 02:34:44 pm
It's easy in 2 steps.

1. Find and add all contacts to a group.  End of step.

2. Return to advanced search and start over.  Find any contact who has made a contribution.

3. Remove those results from the group you just created in step 1.

Those left over are those who have never made a contribution.  This can be done with regular groups, or with Smart Groups and using the Include/Exclude search make a semi-permanent smart group of "those who have never donated".

You can can learn this and more at CiviTeacher.  There is a video on this exact subject.
« Last Edit: August 27, 2013, 02:36:38 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

betalister

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: Several
  • CMS version: Drupal, WordPress
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contacts without contributions
August 27, 2013, 02:38:28 pm
Ahhh, Stuart, I remembered that you once taught me this was just typing it up right as you posted.

This works but is really tedious. Is there a more efficient SQL query?

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: Contacts without contributions
August 27, 2013, 03:12:56 pm
Sure, you could write a hella cool "NOT IN" MySQL query, but not within the CiviCRM interface (yet). 

However, if you identify a need you can create a combined Smart Group so you don't have to endure the tedium daily.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

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: Contacts without contributions
August 27, 2013, 05:52:07 pm

Another easy quick option might be to write a custom search and release it as an extension (so others can benefit)

Should be a fairly easy quick custom search (maybe 2-3 hours?, depending on the different options u wanna expose)

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

betalister

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: Several
  • CMS version: Drupal, WordPress
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contacts without contributions
August 28, 2013, 10:04:54 am
Great idea! I will work on Baby's First Extension. Good practice for me.

I did discover that I could accomplish my goal by using smart groups and the custom Include/Exclude Search.

betalister

  • I’m new here
  • *
  • Posts: 9
  • Karma: 0
  • CiviCRM version: Several
  • CMS version: Drupal, WordPress
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Contacts without contributions
August 31, 2013, 03:58:28 pm
I started a basic extension! https://github.com/betalister/CiviExtension/blob/master/ContactsWithoutContributions.php

It works so far but not on smart groups...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Contacts without contributions

This forum was archived on 2017-11-26.