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) »
  • Displaying Group member totals in Drupal Views
Pages: [1]

Author Topic: Displaying Group member totals in Drupal Views  (Read 3388 times)

irvken

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 1
Displaying Group member totals in Drupal Views
January 22, 2010, 03:36:49 am
I wonder if someone can give me some pointers, I'm trying to create a view that will list CiviCRM Groups and the total number of group members, and display them in a Drupal block, but getting a bit confused as to whether the right data is exposed to views from CiviCRM to do this or if it's just my lack of Views experience that's letting me down.

It would be good if

1) someone could confirm if this is possible
2) point me at something similar I can adapt or tell me what the key element in views that I need to include is.

Cheers

Sean

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: Displaying Group member totals in Drupal Views
January 22, 2010, 10:30:34 am
Hey

the groups should be available to list, as of 3.0, the count on the other hand is not so easy.  You may want to kick the tires on the "views group by" module, http://drupal.org/project/views_groupby, though I have had mixed results with it.  The groups that are available are only available through a contact record, so you won't be able to list groups that have no members

The next major release of Views (Views 3) should be able to get you closer and it will support group by statements in views, and consequently count, sum, and a couple other aggregate functions.  That said Views 3 is still in alpha.

http://www.rootyhollow.com

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: Displaying Group member totals in Drupal Views
January 22, 2010, 10:46:19 am
I should mention that Views 3 alpha is stable and I have used it with CiviCRM 3.0 & 3.1
http://www.rootyhollow.com

TallDavid

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
    • ATO Zeta Mu Alumni
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.52
  • PHP version: 5.2.13
Re: Displaying Group member totals in Drupal Views
January 30, 2010, 10:49:28 pm
You might also want to look at the views_calc module: http://drupal.org/project/views_calc

Quote
You can SUM, AVERAGE, COUNT, MIN, MAX, or AVG selected columns. A plug in theme makes the view look more spreadsheet-like (right justifies numeric fields, shades calculated columns and rows, and underlines calculated rows).

You can also create custom dynamic fields that can be used in any view using SQL snippets like CONCAT('field_first_name', ' ', 'field_last_name') or DATE_FORMAT(node.created, '%m/%%d/%Y'). The custom fields are set up in admin/settings/views_calc.

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: Displaying Group member totals in Drupal Views
December 05, 2011, 08:03:05 pm
may have been better as a new post, but I was looking for an answer to the question of 'can i make a View based on CiviCRM Groups' - ie that is the View Type.

But I don't see CiviCRM Groups as an option when building the View.

Am I missing something?
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Displaying Group member totals in Drupal Views

This forum was archived on 2017-11-26.