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) »
  • Profile searches for "No" on Yes/No fields return all blanks as well
Pages: [1]

Author Topic: Profile searches for "No" on Yes/No fields return all blanks as well  (Read 706 times)

Rob McCausland

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
    • Community Media Database
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6.20
  • MySQL version: 5
  • PHP version: 5.2
Profile searches for "No" on Yes/No fields return all blanks as well
March 21, 2011, 05:57:17 am
[ originally posted in Post-Install Config Forum on 3/19 ]

Hi -

When I use a Search Profile to find all contacts where a specific Yes/No field equals "No", the results I get are all those where the field is empty, as well as all those where the value is "No."

However, when I use Search Builder to count my contacts where that same Yes/No field is "No" ("0"), I only get the actual "No" contacts (54), as opposed to when I use it to count all nulls in that field, getting a much larger number (1754).

Thus, people using my Search Profile to find contacts where the value of the Yes/No fields is "No" are getting huge false negative results.

Is there a simple fix for this?  I'm guessing other newbies have tripped up on this, and that I must be overlooking something.  Thanks.

~ Rob

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: Profile searches for "No" on Yes/No fields return all blanks as well
March 21, 2011, 08:00:51 am
hey rob:

1. can u reproduce this on our sandbox server (running 3.4)

2. if so, i suspect the fix is not too simple. If you can spend time figuring out where in the query the bug is being introduced that would be great. Ping us on IRC if u need help getting started

thanx

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Profile searches for "No" on Yes/No fields return all blanks as well

This forum was archived on 2017-11-26.