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) »
  • Omit a custom field through Advance Search
Pages: [1]

Author Topic: Omit a custom field through Advance Search  (Read 542 times)

Beth Hynes

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: I don't know
  • PHP version: I don't know
Omit a custom field through Advance Search
November 05, 2012, 10:21:10 am
Hello all,

Brand new user of Civi. We have a number of custom check boxes for our members preferences in receiving things like magazine or premium. The box is marked when a member does not want something.

I want to find for people who have donated in a specific time period and campaign and then omit the people who do not want a premium from that list in order to print out labels for the premiums.

I have looked at Advance Find and Search Builder and do not see how to do the above.

Thanks for your help!

Beth

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Omit a custom field through Advance Search
November 05, 2012, 10:40:58 am
Hi Beth,

You've stumbled upon what I think is probably the biggest UI problem in all of Civi!

Fortunately, in your situation, I think you can use Search Builder and rethink the query - instead of "Omit those with no premium", you can also think of it as, "everyone with a premium"

Go to Search menu -> Search Builder.  Under "Include Contacts Where", select "Individual" (assuming that it's a custom field for Individuals and not all Contacts, in which case, select "Contacts").  Then select the Premium field from the second drop-down.  From the third drop-down, select "IS NOT NULL", and press Search.

That should give you the list of folks with any premium.  From there, create a Smart Group of those folks.

Then, you can go into Advanced Search, and run the search by contribution time period/campaign, and select "People with Premiums" under "Group".  That should limit your results to only folks who have selected a premium.

Hope that helps, if not let me know, but please report back either way!

Best,
Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

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: Omit a custom field through Advance Search
November 05, 2012, 10:45:41 am
Also can we confirm that you do have the Custom Fields showing in Adv Search - if not - go back to the Field and tick the 'searchable' so it is.

Another trick to remember is under Custom Search there is an Include/Exclude Group/Tag search - so you can say 'find the people in Group X but drop out people in Group Y'
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

Beth Hynes

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: I don't know
  • PHP version: I don't know
Re: Omit a custom field through Advance Search
November 05, 2012, 11:45:05 am
Thanks for the prompt responses!

Yes, the Custom Field is showing in Adv Search.

About the Search itself - I wonder if due to not knowing about this issue we set up our custom fields incorrectly for Civi?! (They were based on how things were done in our former db which could omit a group with an activity from a found set.) They are Do Nots - like "Do Not send premium". Additionally, the fields are button fields not check boxes (if it makes a difference). So when a person marks the Yes button, then they are asking to not receive a premium.

I followed the instructions and selected "Is not null" and got back the found set of those who do not wish to receive a premium--those marked Yes. I tried "Is null" and got back a huge list (premiums being offered very selectively) almost all of whom should NOT receive a premium.

Any more thoughts?
Thanks, Beth

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Omit a custom field through Advance Search

This forum was archived on 2017-11-26.