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) »
  • Search for EMPTY or NULL is not working
Pages: [1]

Author Topic: Search for EMPTY or NULL is not working  (Read 475 times)

maduko

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.5.8
  • CMS version: Drupal 7
  • MySQL version: 5 something
  • PHP version: dunno
Search for EMPTY or NULL is not working
April 03, 2015, 06:26:19 am
After importing a large group of contacts I am trying to identify those that include an External ID.

Using the Advanced Search we tried various combinations of Null and Empty (all upper case, all lower, etc). None of them return any results.

After checking the obvious (yes, there are some records with an external identifier and some without) I am posing the question here: How do I find the records that do not have anything in that field?

Civi 4.5.8 on Drupal 7

ayduns

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 6
    • Squiffle Consulting
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
Re: Search for EMPTY or NULL is not working
April 03, 2015, 10:09:42 am
I don't think you can do that with Advanced Search, but Search Builder lets you search for EMPTY or NULL.

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: Search for EMPTY or NULL is not working
April 03, 2015, 10:11:14 am
Hi maduko,

You need to use Search Builder, not Advanced Search, to get the results you need.  Select Contacts, External Identifier, is empty.



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

maduko

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.5.8
  • CMS version: Drupal 7
  • MySQL version: 5 something
  • PHP version: dunno
Re: Search for EMPTY or NULL is not working
April 03, 2015, 10:38:28 am
Aha!

Thank you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search for EMPTY or NULL is not working

This forum was archived on 2017-11-26.