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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.3 Release Testing (Moderator: pdelbar) »
  • Smart groups not working as expected with search builder
Pages: [1]

Author Topic: Smart groups not working as expected with search builder  (Read 1150 times)

rjm

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 6.28
Smart groups not working as expected with search builder
March 12, 2013, 05:32:14 am
I am looking to exclude contacts in one smart group if the contact is tagged or it exists in another specific smart group and it is not working as I would expect.

We have Smart Group A set up to be comprised of everyone who has selected a custom selector field A data "A".
We also have a Tag B.

We would like to set up a Smart Group that is comprised of everyone who has Custom Field A who does not have Tag B.

The search criteria is set up as follows:

Contacts    Custom Field A = "A"
Contacts    Tags != B

I was thinking that both criteria would need to be satisfied in order to find the contact.  I am finding that if either criteria is satisfied the contact will display.

I also tried making a smart group based on Tag B and changing the second criteria to Contacts Groups != <new smart group based on tag B>

This had the same result.

Going over everything once again, there was a second tag checked, which I removed.  Once the second tag was removed the contact did move out of the smart group as expected, so it appears as if the criteria:

contact   tag != B

Will work to test ANY tag, not just tag B.

Is this by design?  Is there a way to do exclude a contact based on criteria like a tag?

I was also wondering how often smart groups get updated after a change is made, and how/where to change this frequency if required.  In our environment we will want to have changes occur within a second or two if possible.  It appears as if a change to a tag which effects inclusion in a smart group will only happen after a few minutes.  I would like to shorten this up.

« Last Edit: March 12, 2013, 05:43:11 am by rjm »

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: Smart groups not working as expected with search builder
March 12, 2013, 09:05:19 am

groups and tags need to use set operators rather than numeric operators and hence i dont think search builder does the right thing

try using the custom search include/exclude groups

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

rjm

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 6.28
Re: Smart groups not working as expected with search builder
March 12, 2013, 12:50:57 pm
Can I build groups with custom search? 

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 groups not working as expected with search builder
March 12, 2013, 04:20:51 pm
There is a Custom Search for Include/Exclude - give it a go - yes you should be able to create new groups from it eg

http://drupal.demo.civicrm.org/civicrm/contact/search/custom?csid=4&reset=1
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

rjm

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 6.28
Re: Smart groups not working as expected with search builder
March 13, 2013, 04:57:49 am
Thanks Pete!  I'll look into it.  I appreciate your tip.  I love this product!  Sometimes it is difficult to see the forrest for the trees. 
« Last Edit: March 13, 2013, 05:03:55 am by rjm »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.3 Release Testing (Moderator: pdelbar) »
  • Smart groups not working as expected with search builder

This forum was archived on 2017-11-26.