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 on empty date field
Pages: [1]

Author Topic: search on empty date field  (Read 804 times)

trimtri

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Joomla! 1.5.23
  • PHP version: 5.2.15
search on empty date field
May 23, 2011, 02:50:56 am
I have an autocomplete field in a custom data tab of individual contact to record the places where one has been living, an date field to record when one arrived and and other date field when departed. If the field for departed date is empty, it means that that one is still living a place. How do I make a search or report to list all who is still living in a place.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: search on empty date field
May 23, 2011, 10:38:33 am
You should be able to do this in Search Builder since it exposes custom contact fields and has an IS NULL operator. (Search > Search Builder from the navigation menu).
Protect your investment in CiviCRM by  becoming a Member!

trimtri

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Joomla! 1.5.23
  • PHP version: 5.2.15
Re: search on empty date field
May 23, 2011, 09:05:55 pm
Thank you, Dave, for your kind reply. But my custom contact field in 'multitple record' not available in Search Builder. I use CiviCrm 3.4.1 in Joomla 1.5.23.

I don't know if this is the problem with custom fields in 'multiple record' custom set as in this warning:


CAUTION: The following features are NOT available for custom fields in 'multiple record' custom set:

These fields can not be used in Profiles
They can not be Imported or Exported
If they are included in a report as a display column, only the first set of values are shown.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: search on empty date field
May 24, 2011, 08:47:54 pm
Yes - there is limited support for multiple record custom data - and I guess Search Builder doesn't support that at this point. You could experiment with Constituent Report (Summary) which does include  "searchable" custom fields, AND allows filters of IS NULL on date fields. However, you might have to do some debugging and coding to get it to work with multiple record custom fields (I suspect this will be easier than trying to get this working in Search builder).
Protect your investment in CiviCRM by  becoming a Member!

trimtri

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 3.4.2
  • CMS version: Joomla! 1.5.23
  • PHP version: 5.2.15
Re: search on empty date field
May 25, 2011, 06:15:17 pm
Thank you, Dave. Constituent can help me without any coding.

I have another question. Can CiviCRM have an mutiple record field in another mutiple record field? Because during the period of time in some places, one can hold different positions in different duration.

For example:
- 2002-2008: in Binh Gia, Tri held two positions: Guardian (2003-2005) and Secretary (2005-2008).

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: search on empty date field
May 27, 2011, 01:52:41 pm
It's not possible to nest custom data sets - so I can't think of a way to do that without making it multiple entries in your initial set of fields (adding position and duration). Think of this as a single table with N columns, the values in some of the columns will be repeated.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • search on empty date field

This forum was archived on 2017-11-26.