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) »
  • Searching yes/no fields?
Pages: [1]

Author Topic: Searching yes/no fields?  (Read 302 times)

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
Searching yes/no fields?
June 12, 2014, 05:57:17 am
I just realised that while importing data, about 50 records that had a yes/no field set to "No" imported with skipping the field. That is, all the records that were "Yes" imported as "Yes". The records that were "No" imported as nothing. I found this when I ran an export to csv.

I tried do an advance search on that field, but it looks like I can search either on "Yes" or "no", but not on "neither". Unless I'm missing something?

What would be the best way to update those fields, short of searching one name at a time and editing one record at a time?

Thanks

Nic

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Searching yes/no fields?
June 12, 2014, 06:23:16 am
Have you tried using the search builder?  You should have both Is Null and Is Empty options there

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
Re: Searching yes/no fields?
June 12, 2014, 06:31:33 am
Thank you! Exactly what I needed.

vavroom

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 4
    • Part of a Whole
  • CiviCRM version: 4.4.4
  • CMS version: Wordpress
  • MySQL version: 5.6.11
  • PHP version: 5.5.3
Re: Searching yes/no fields?
June 12, 2014, 06:45:50 am
Actually... Something's amiss...

The yes/no field I'm searching on is a custom field.

Searching on "is empty" returns all the records where that field should have been no. Including several that *are* actually showing no ticked.

Searching on "is null" returns several records that should in fact be marked as "yes".

*scratching head*

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Searching yes/no fields?
June 12, 2014, 07:02:48 am
Actually, I seem to remember that there was a problem of some kind with the yes/no fields.  Perhaps you should search  the issue tracker.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Searching yes/no fields?

This forum was archived on 2017-11-26.