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) »
  • Contact Search on Custom Field Question
Pages: [1]

Author Topic: Contact Search on Custom Field Question  (Read 701 times)

jbertolacci

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
Contact Search on Custom Field Question
January 14, 2010, 05:02:10 pm
Our organization offers discounts on the purchase of Subaru vehicles for our members. In order to get the discount we collect some basic information and place a request into Subaru.

To track each request I created a Custom Data Group used for Contacts, and since each contact may have multiple requests I set the Custom Data Group to allow multiple records. I created the Custom Fields including a "Request Created Date" and "Request Processed Date". All is well and we are tracking requests just fine.

Now I need to search and find contacts which have unprocessed requests -- these would be requests with a NULL "Request Processed Date". I first went to search builder but the custom data fields do not appear in the list of fields associate with the individual, household, or organization record types.

So I went to the Advanced Search where the custom fields do appear and are searchable. I can't search for a NULL date in Advanced Search (or haven't figured out how), only a date range, so I searched for all contacts with custom field "Request Created Date" which fell within a certain range hoping to find the four contacts where I had created requests.

The search returned 140,000+ records.

Would someone please help me understand the behavior of the search in this instance. Is this somehow a product of searching on a field in a Custom Data Group which allows multiple records?

I am running CiviCRM 3.0.0.

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: Contact Search on Custom Field Question
January 14, 2010, 07:49:58 pm

can u check mysql log and see the search query, and then basically run it manually and see why u r getting 140K records. i suspect a badly formed query?

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) »
  • Contact Search on Custom Field Question

This forum was archived on 2017-11-26.