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 Drupal Modules (Moderator: Donald Lobo) »
  • How to produce lists of contacts in age groups?
Pages: [1]

Author Topic: How to produce lists of contacts in age groups?  (Read 1771 times)

Martin Fuggle

  • I post frequently
  • ***
  • Posts: 172
  • Karma: 3
    • Travel and Photography
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 6.x and 7.x
  • MySQL version: 5.1.36-cll
  • PHP version: 5.3.6
How to produce lists of contacts in age groups?
September 09, 2011, 04:34:21 am
I have a website that is used by a Rugby Union Club and we run teams in various age groups.  I want to be able to produce a list of contacts who's birth date is between two dates which can be entered by the user.  I have tried the following two methods both of which use Views 2:
  • Method 1
    • Create Smart Groups to gather contacts in age groups
    • Display the information required in a view and expose a filter which contains the group
    • This method doesn't work since smart groups are not supported in Views
  • Method 2
    • Display the information required in a view and expose a filter which contains the field Birth Date
    • This method doesn't work since the Birth Date field does not display the date handlers in Views to enable the start and end dates to be entered
In both cases I am stymied and I have not been able to determine another method. I would appreciate some suggestions to solve the problem.

Cheers
Martin Fuggle

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: How to produce lists of contacts in age groups?
September 09, 2011, 07:59:58 am

Would be great if you can extend the views support so that it supports smart groups and/or hand date handler support to birth date

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

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: How to produce lists of contacts in age groups?
September 09, 2011, 08:04:06 am
The only other solution I could think of would be a custom-coded form in Drupal.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Martin Fuggle

  • I post frequently
  • ***
  • Posts: 172
  • Karma: 3
    • Travel and Photography
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 6.x and 7.x
  • MySQL version: 5.1.36-cll
  • PHP version: 5.3.6
Re: How to produce lists of contacts in age groups?
September 09, 2011, 04:06:06 pm
Quote from: Donald Lobo on September 09, 2011, 07:59:58 am

Would be great if you can extend the views support so that it supports smart groups and/or hand date handler support to birth date

lobo

Unfortunately I do not have the skills to do this.  If I were able to do so I would. It seems to me that this functionality would be very useful and if there was a preference I would enhance Views to support Smart Groups.  I presume a Smart Group executes some SQL commands which could (or should) be incorporated into the SQL generated by the Views SQL. Is it that simple?

Cheers
Martin Fuggle

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Re: How to produce lists of contacts in age groups?
August 29, 2013, 06:27:50 am
I agree. There is code for a Drupal 6 module which, while limited in filtering, does function http://forum.civicrm.org/index.php/topic,25479.msg107913.html#msg107913

I am going to pay for that code to be ported to Drupal 7 and perhaps tweaked somewhat to allow and / or filtering on the group IDs. Further to that there is an issue with Drupal Groups being synced into Views which results in an SQL error. I will ask the developers to attend to this issue in the Drupal / Views integration code.
www.ulearnschool.com

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • How to produce lists of contacts in age groups?

This forum was archived on 2017-11-26.