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 Builder using > custom date field
Pages: [1]

Author Topic: Search Builder using > custom date field  (Read 634 times)

robbiemc

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.37
  • PHP version: 5.3.28
Search Builder using > custom date field
March 21, 2013, 09:48:03 am
Hi

Is it possible to use search builder to search on a custom date field using 'greater than today's date'...?

This would enable us to then create a smart group which would dictate contacts viewable in a profile.

Cheers
Robbie


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Search Builder using > custom date field
March 21, 2013, 09:52:43 am
Just tried it on my 4.3 sandbox with the sample "Marriage Date" custom field and seems to work nicely. That said, Search Builder has been improved substantially in 4.3 - so not sure how well it will work in 4.2. You could try both using the public demo and the 4.3 sandbox (http://sandbox.civicrm.org).
Protect your investment in CiviCRM by  becoming a Member!

robbiemc

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.37
  • PHP version: 5.3.28
Re: Search Builder using > custom date field
March 21, 2013, 10:58:37 am
Hi Dave

Many thanks for the quick response...but how exactly would we search for greater than todays date using search builder...?We've had no success.

Robbie

robbiemc

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.37
  • PHP version: 5.3.28
Re: Search Builder using > custom date field
March 21, 2013, 11:08:18 am
sorry, forgot to add that the idea is not to physically add 'today's date' in the search builder ie 21/03/2013 but to add a statement such as NOW() which would mean the contacts in the smart group will constantly be updated with those having a custom field date prior to the current date dropping out.

We have tried

individual - custom field - > - Today's Date
individual - custom field - > - NOW()

etc

This will provide us with a smart group that only lists contacts with the custom date field that is in the future.

Hope this makes sense

Robbie

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: Search Builder using > custom date field
March 21, 2013, 11:58:50 am

relative dates have not yet made it into search builder. Would definitely be a great enhancement. I suspect its a 10-20 hour project. Can you help developing this? We can get you started via the developer book and IRC

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

robbiemc

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.37
  • PHP version: 5.3.28
Re: Search Builder using > custom date field
March 22, 2013, 01:49:37 am
Hi Lobo

Many thanks for the update.

The post was on behalf of a friend who uses a Civi/Joomla build to record details of individuals enquiring about booking a venue for parties weddings etc. I don't think he has a budget for sponsored development but I will certainly ask.

His idea was for individuals looking to book his venue to complete a profile indicating what they wanted to book the venue for and giving dates. He then wanted to display a profile listing of individual contacts that had made the booking enquiry - but only those that's dates were in the future. This would be then viewable to his staff after logging in so they may contact the potential customer.

My suggestion was to create a smart group but he was unable to do so for, as per the forum post, we have been unable to search based on only showing custom date in the future.

Can you suggest any alternative methodology? I had also suggested possibly looking at case or events but he feels that's a lot of work for a simple booking enquiry.

Any suggestions would be most appreciated.

Cheers

Robbie
YNWA

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: Search Builder using > custom date field
March 22, 2013, 08:29:19 am

he can try doing the search via advanced search, but that still does not have days after today (which is also a good feature add)

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: Search Builder using > custom date field
March 22, 2013, 06:07:33 pm
if you are on drupal and not needing to use the civicrm 'actions' afterwards (you mention just calling up people i think) you can look at what Views provides, which does allow relative date search on date custom fields
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

robbiemc

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 0
  • CiviCRM version: 4.5.0
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.37
  • PHP version: 5.3.28
Re: Search Builder using > custom date field
March 23, 2013, 08:12:39 am
Hi Pete

Unfortunately, despite my advise, he's using joomla.

Regards

Robbie

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search Builder using > custom date field

This forum was archived on 2017-11-26.