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 (Moderator: Dave Greenberg) »
  • Not both but neither
Pages: [1]

Author Topic: Not both but neither  (Read 1307 times)

mcoleman

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal
  • MySQL version: I don't know
  • PHP version: I don't know
Not both but neither
May 28, 2013, 10:45:19 am
I'm using search builder to find certain contacts that have yes or no selected in a certain field, but I was wondering if there was a way to find contacts who have neither selected? I thought using NULL would work, but it doesn't apply to radio fields.

mcoleman

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal
  • MySQL version: I don't know
  • PHP version: I don't know
Re: Not both but neither
May 28, 2013, 11:19:57 am
The total amount of people I have in a particular group(C) does not match up with the amount of people who selected Yes(A) or NO(B). (A+B is supposed to = C) So I figured there are a few who have not selected either, but with over 7000 contacts, it is a little hard to sift through and pick them out.

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: Not both but neither
May 28, 2013, 12:13:38 pm
Have you tried using Search Builder which can search for NULL
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

hbergin

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 6
  • CiviCRM version: 3.4.5 to 4.4.1
  • CMS version: Drupal 6.28 to 7.23
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Not both but neither
May 29, 2013, 07:01:40 am
Have you tried the "Is Empty" option?  Both "Is Empty" and "IS NULL" worked for me on a Yes/No radio button in the search builder.  This just tried on 4.3.3. 

Also tried it on the Gender field on the demo site search builder.

mcoleman

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal
  • MySQL version: I don't know
  • PHP version: I don't know
Re: Not both but neither
May 30, 2013, 12:15:12 pm
I did not realize that there was an empty option. do i need to turn that option on?

hbergin

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 6
  • CiviCRM version: 3.4.5 to 4.4.1
  • CMS version: Drupal 6.28 to 7.23
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Not both but neither
May 30, 2013, 12:21:42 pm
In the Search Builder, when you have selected your record type, and field, in the operator drop down list, do you see:

-operater-
=
!=
IN
IS EMPTY
IS NOT EMPTY
IS NULL
IS NOT NULL

If you don't see the above, what do you see?





mcoleman

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal
  • MySQL version: I don't know
  • PHP version: I don't know
Re: Not both but neither
June 04, 2013, 10:55:22 am
I do see that, well except for the empty part. Mine looks like this:
-operator-
=
!=
>
<
>=
<=
IN
LIKE
RLIKE
IS NULL
IS NOT NULL

hbergin

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 6
  • CiviCRM version: 3.4.5 to 4.4.1
  • CMS version: Drupal 6.28 to 7.23
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Not both but neither
June 04, 2013, 01:58:15 pm
Ah, I see.  When I run on a 4.3 instance, the options are different (e.g. they look like mine).

When I run the same search builder query on a 4.2 system, I see your options.

On a 4.2.6 system I have, the "IS NULL" operator option still gave me a list of the Yes/No boolean radio button values that had not been set.

e.g. IS NOT NULL gave me a list of people who had either yes or no selected
       IS NULL gave me a list of people that had neither yes or no selected.

Is that not the case for you? 

Is your radio button a boolean field type?  e.g "Yes or No" data type when you view the list of fields in the custom data set.


mcoleman

  • I’m new here
  • *
  • Posts: 13
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal
  • MySQL version: I don't know
  • PHP version: I don't know
Re: Not both but neither
June 14, 2013, 12:40:15 pm
I apologize for taking so long to get back. The IS NULL option does work now, but I could have sworn that it didn't when I first started this project. I think my boss may have upgraded, or something. Thank you for your help.

If you have a spare minute though, I have a new issue. I created a profile to help me find Contact Comment Fields that are not null, but when I do a batch update I get all my contacts as a search result. If I look at a particular contact whom I know has info in there Contact Comment Field I can see it separately, but the batch update always shows the field as blank.

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: Not both but neither
June 14, 2013, 01:10:20 pm
Definitely better to raise a new question in a new thread. Pls explain what 'type' of field this is eg a multiple record field etc
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Not both but neither

This forum was archived on 2017-11-26.