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) »
  • Problem with IS NULL operator in search builder
Pages: [1]

Author Topic: Problem with IS NULL operator in search builder  (Read 3163 times)

EdP

  • I post frequently
  • ***
  • Posts: 260
  • Karma: 7
  • CiviCRM version: 4.4
  • CMS version: Joomla 2.5.x
Problem with IS NULL operator in search builder
April 26, 2010, 01:56:49 am
I was trying to find contacts who were not in any group. I used search builder and searched for "individuals" where "Group" "IS NULL".
I got an error saying that I should remove the text from the box which specifies the search criteria. I hadn't put any in. You get the same outcome on the Joomla demo site.

It may be that this is the wrong way to search for this criteria - but even if it is, the error message is unhelpful.

Its a minor thing, but unexpected and given the error message looks more like a bug than user error (for once!)

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: Problem with IS NULL operator in search builder
April 26, 2010, 07:13:15 am

would be great if you can investigate and submit a patch to fix this issue

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

est

  • Guest
Re: Problem with IS NULL operator in search builder
May 11, 2010, 02:18:58 am
I have the same problem on Drupal site. Also IS NOT NULL operator does not work in search builder.

It says:

Code: [Select]
Please correct the following errors in the form fields below:
    Please clear your value if you want to use IS NULL operator.

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: Problem with IS NULL operator in search builder
May 11, 2010, 07:37:01 am

can you investigate and submit a patch that will handle both IS NULL and IS NOT NULL

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

greache

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Problem with IS NULL operator in search builder
May 27, 2010, 09:16:15 pm
Any progress on this ... I can't search for people without a tag / group either ... sry I can't even start to fix it with a patch  :o

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: Problem with IS NULL operator in search builder
May 27, 2010, 09:33:51 pm

no. if important to you, consider hiring someone from http://civicrm.org/professional/ to work on a patch / improve search builder functionality

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

moosed

  • Guest
Re: Problem with IS NULL operator in search builder
September 19, 2010, 01:32:57 am
I don't know if you solved this.  I've added this patch to my query.php file, and selecting EMAIL IS NULL or EMAIL IS NOT NULL works using the Search Builder.

civiCRM 3.2.1
Joomla 1.5.13
Community Builder 1.2.3

<JOOMLA WEBROOT>/administrator/components/com_civicrm/civicrm/CRM/Contact/BAO/query.php

Code: [Select]
*** query.php 2010-09-18 20:11:20.833584429 -1000
--- query.php2 2010-09-18 20:17:02.413584328 -1000
***************
*** 2576,2581 ****
--- 2576,2585 ----
              } else {
                  $value = "'$value'";
              }
+         }
+         if ( $op == 'IS NULL' ||
+              $op == 'IS NOT NULL' ) {
+              $value = null;
          }
 
          $this->_tables['civicrm_email'] = $this->_whereTables['civicrm_email'] = 1;

Let me know if you found a better solution!

Doug

b0b_z

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 0
  • CiviCRM version: 4.1.6
  • CMS version: Drupal 7.19
  • MySQL version: 5.1.63
  • PHP version: 5.2.17
Re: Problem with IS NULL operator in search builder
July 20, 2012, 10:27:57 am
I'm having the same problem in Civicrm 4.1.2/Drup with the same search

Anyone figure a workaround?

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: Problem with IS NULL operator in search builder
July 20, 2012, 11:00:36 am

Thanx to the great folks at New York State Senate, a lot of fixes and improvements for search builder are coming in 4.3. However u'll need to wait for this release which is likely to be in october or so

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

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: Problem with IS NULL operator in search builder
July 20, 2012, 03:04:48 pm
Yay for the NYSS and those working with them ;-)
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

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: Problem with IS NULL operator in search builder
July 21, 2012, 05:54:37 pm

now, all we need to find are 2-3 more organizations who are good community contributors and participants like them.

petednz: u need to work on the greens party worldwide and get them to replicate the NYSS model :)

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

Owen

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 2
    • Leukaemia & Lymphoma Research
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7
  • MySQL version: -
  • PHP version: -
Re: Problem with IS NULL operator in search builder
July 23, 2012, 07:47:24 am
Good news indeed, thank you NYSS  :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Problem with IS NULL operator in search builder

This forum was archived on 2017-11-26.