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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Smart group based on relationships from smart group
Pages: [1]

Author Topic: Smart group based on relationships from smart group  (Read 674 times)

flo81

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
  • CiviCRM version: 4.5.8
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.40
  • PHP version: 5.4
Smart group based on relationships from smart group
March 30, 2015, 08:20:03 am
Hello,

I have set up several smart groups based on relationships between contacts. I used advanced search to get related contacts (like getting all employees of a particular organization). It works fine. Now I'm trying to create a smart group by fetching all related contacts (with a particular relationship type) of all contacts in my previous smart group. For instance imagine I have a "parent of" relationship, I make an advanced search on my previous smart group and ask for related contact with the relationship "parent of".

So in fact I'm trying to create a smart group based on a smart group.

Basically it seems to make sense, and it works, sometimes...When I do several simple search on the second smart group, results are different (sometimes I get the first smart group content), and smart group counts are very strange. When I update them I usually get the same count for all smart groups (I have several of these "smart group based smart groups").

Am I asking too much from the smart group system ? Do I need to give up with this idea ?

Sorry if it is unclear, but the whole thing (and its consequences) is hard to explain...

Thanks

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: Smart group based on relationships from smart group
March 30, 2015, 12:50:41 pm
i don't think Adv Search will handle this so you/someone may need to cook up a Custom Search for this.
If your need is 'only' to display the list of such contacts rather than perform an Action on them, then Drupal Views can 'daisy chain' civi relationships together.
And given our work with Views Bulk Operations and civi entities (see this blog http://www.fuzion.co.nz/blogs/altering-civicrm-data-using-views-bulk-operations-drupal) you would be able to perform some actions via Views too.

hth
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

flo81

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
  • CiviCRM version: 4.5.8
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.40
  • PHP version: 5.4
Re: Smart group based on relationships from smart group
March 30, 2015, 11:50:49 pm
OK, rethinking of what I tried it seems to be tricky to handle (the system would have to know that a smart group depends on another, and therefore update them in the right order, which must be a great deal).

The fact is I really need to perform actions on my second smart group, and given the fact that this group won't change frequently I think I will create regular groups and explain my client that he needs to maintain it manually.

The Views / VBO integration seems really cool, I will definitely take a look as soon as possible !

Thank for your answer.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Smart group based on relationships from smart group

This forum was archived on 2017-11-26.