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 (Moderator: Dave Greenberg) »
  • A Search Technique
Pages: [1]

Author Topic: A Search Technique  (Read 1000 times)

David L

  • I post occasionally
  • **
  • Posts: 55
  • Karma: 2
A Search Technique
October 20, 2010, 12:27:11 pm
Here is an actual scenario which occurred yesterday in the office:

We have five workers who do calls all day touching base with our constituents. They each have a tag which is theirs (ie Jim Call, Jack Call, etc). I was asked to assign each worker 200 contacts from the New York group for them to call. So I opened the New York group, selected 200 contacts at a shot and assigned them to a tag, and repeated till all five tags had 200 contacts assigned. Nice and simple, all good and dandy.

Now, I wanted to run a search on the New York group to find all contacts in the group which were not yet assigned to one of the worker tags. I opened search builder and ran this:
Include Contacts Where
Individual : Group = 4 (ie New York group)
(and) Individual : Tag != 10 (Jim Call)
(and) Individual : Tag != 11 (Jack Call)
etc......


But it doesn't really work. What happens is that if a contact in the New York group has only one tag, and that tag is Jack Call or Jim Call, then it will not show up in the Search Result, as it indeed should not. However, if the contact has two or more tags, one being Jim Call and one being some other random tag (ie Volunteer tag), then that contact does show up in the search results. Because CiviCRM does not interpret Include Contact Where : Individual : Tag != 10 (Jim Call) as avoid all contacts with this tag, but rather as avoid all contacts with only this tag.

So is there a way for me to run my search?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: A Search Technique
October 20, 2010, 03:11:44 pm
Hi,

I'd create a smart group 'assigned NY' from advanced search (tag Jim OR Jack OR...)

And then use the custom search group New york and NOT group assigned NY

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

David L

  • I post occasionally
  • **
  • Posts: 55
  • Karma: 2
Re: A Search Technique
October 20, 2010, 03:27:31 pm
Hi Xavier,

I tried it, but it does not work for the same reason.

CiviCRM is interpreting Include Contact Where : Individual : Group != Assigned-NY as exclude contacts which are only part of group Assigned-NY, but since all Assigned-NY contacts are also in another group, the New York group, the Assigned-NY contacts are not being excluded from the results.

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: A Search Technique
October 21, 2010, 01:16:42 am
doesn't help you now, but you read about CiviCampaign which I think would be good for your usage.

in the above, why can't you just add your 200 + 200 + 200 in to a Group - then use the Custom Search  ' this group not that group'?
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

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: A Search Technique
October 21, 2010, 04:19:05 am
Have you tried using the standard Custom Search CRM_Contact_Form_Search_Custom_Group (to be found in Administer/Customize/Manage Custom Searches?

This link will give you the custom search on the demo site:
http://drupal.demo.civicrm.org/civicrm/contact/search/custom?reset=1&csid=4
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • A Search Technique

This forum was archived on 2017-11-26.