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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Custom Search - how to use Smart Groups
Pages: [1]

Author Topic: Custom Search - how to use Smart Groups  (Read 1699 times)

tmcnulty1982

  • Guest
Custom Search - how to use Smart Groups
November 06, 2008, 08:23:54 am
I'm trying to create a custom search that excludes people in a given group.  That obviously doesn't work if the group is a Smart Group, because, afaict, membership is not controlled by the civicrm_group_contact table, but rather by some SELECT statement somewhere.

Is there some way I can get either (a) that select statement and run it as a subselect in my custom search or, if that's not possible, (b) evaluate the smart group and get a list of the contact IDs, so I can exclude them manually in my custom search?

Thanks
Tobias

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Search - how to use Smart Groups
November 13, 2008, 05:47:58 am
This might help http://svn.civicrm.org/civicrm/branches/v2.1/CRM/Contact/Form/Search/Custom/Group.php

Kurund
Found this reply helpful? Support CiviCRM

tmcnulty1982

  • Guest
Re: Custom Search - how to use Smart Groups
November 20, 2008, 10:59:36 am
Indeed.. After upgrading to 2.1 I was able to build a search using the Include / Exclude groups custom search and save it as a smart group.. works great, thanks!

Tobias

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Custom Search - how to use Smart Groups

This forum was archived on 2017-11-26.