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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Contacts in Group A AND Group B
Pages: [1]

Author Topic: Contacts in Group A AND Group B  (Read 985 times)

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Contacts in Group A AND Group B
April 13, 2011, 07:34:18 am
Still getting my head arouns all the ways to search but I couldn't find a way of doing this Contacts in GROUP A AND B.

My example is: Have a group for a Mailing List and a smart group of contacts with an email address and not flagged don't email.

I want to a.) output labels for the contacts in the mailing list and NOT the smart group (can do this with the advanced Group/Tag Search)
b.) generate the email list IE those in the mailing list AND in the smart group

Any ideas?

Cheers,

Dave

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: Contacts in Group A AND Group B
April 13, 2011, 12:32:47 pm
Dave - are you aware of the 'in this but NOT that group' custom search under Custom Searches ie http://drupal.demo.civicrm.org/civicrm/contact/search/custom/list&reset=1

You may need to make a Group of All then remove one of your Groups from that and then exlude that - but i haven't tried doing a venn diagram of what you are trying to do

but saw in another post you referenced that search so maybe just ignore me

but I seem to point this search out to so many users that perphaps the 'powers that be' would consider adding it to the default menu rather than relying on people to think to clear on Custom Searches to bring up the others

or may have a 'all custom searches' listed so people know there are others (sorry if that seems like hijacking the thread)
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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contacts in Group A AND Group B
April 13, 2011, 12:58:05 pm
Pete - what do you think of modifying the current Search menu so that there's just a single menu item by default called "Custom Searches" which goes to the page which lists all the custom searches. We can include some help text on that page reminding people they can modify Navigation and put any of these that they use frequently into the Search menu (or wherever).

Since we can't predict what custom searches will be needed / used most often for a given site - I'm thinking this is a decent solution. Thoughts?
Protect your investment in CiviCRM by  becoming a Member!

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: Contacts in Group A AND Group B
April 13, 2011, 01:32:36 pm
Hi Dave - thanks for thinking about this - i think what you suggest is better than current where it leaves many people unaware that there are many others - so for sure - what you suggest would work well
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

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Contacts in Group A AND Group B
April 13, 2011, 02:58:04 pm
Hi Both,

Thanks for your input! I had found that custom search - it is very useful but seemed not to do this scenario.

(I think it would be good to have one list as I'm sure users don't click on the first menu but only look in the sub-menu. I think I only found it by accident - glad I did though)

Anyway my thing is when you multi-select in the field which is 'include groups...' it obviously does an OR IE takes all contacts in ANY of the selected groups. This is what I'd expect but I have a situation where I want the contacts that exist in both the groups. IE only contacts that are in group A AND group B. Hope that makes sense.

I presume the tick box is to do with OR/AND between the group selections and tag selections?

Cheers again,

Dave

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: Contacts in Group A AND Group B
April 13, 2011, 03:05:04 pm
Have you tried using Search Builder - that will use AND I expect - you need the Group ID
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

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
[SOLVED] Re: Contacts in Group A AND Group B
April 14, 2011, 06:34:13 am
Thanks, I thought I tried that but didn't realise that by adding another row in the first box it would do an AND (now I think about it that is obvious because the second box is the OR). This indeed did the job.

Although this method means you have to pick each contact type separately (or put them in the OR) because you can't select all contacts for those fields which are common, hay ho, you win some you lose some :-)

Thanks again,

Dave

Andrew Perry

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 1
  • Building empowering tools that comply with rules
    • Community Builders Australia
  • CiviCRM version: 3.x, 4.x
  • CMS version: Joomla 1.0.x, 1.5.x -> Drupal 6.x, 7.x, WordPress
  • MySQL version: 5.1, 5.5, 5.6
  • PHP version: 5.2, 5.3, 5.4
Re: Contacts in Group A AND Group B
April 14, 2011, 06:41:55 am
Yeah, Search Builder can be a bit cumbersome, having to go off and look up IDs and deal with different contact types separately!  Can get repetitive!
Community Builders Australia Pty Ltd
www.communitybuilders.com.au

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Contacts in Group A AND Group B
April 14, 2011, 07:23:18 am
Yeah, but it is quite powerful to be able to build queires from the ground up.

Being a newb I am spotting some inconsistencies to approach in different areas. I'm certainly not trying to pick holes as this is the nature of an OS project I suppose. Would it be helpful for me to collate some thoughts as someone with fresh eyes? (not trying to be presumptious as I'm still learning the CCRM ways :-))

Things like, Tags have a nice tree structure to their parent nesting behaviour but Groups don't follow the same approach (in terms of GUI - IE nesting, ordering and indenting) even though they have the same parent structures; the tags nest on a contact view but not on the tag management screen; like you say about finding the ID numbers, some places have a lookup and drop down for this and others need the ID; some places you can pick contacts others you have to define all 3 types; etc..

As I've said before I think this project is great though and I'm excited about the potenital it has as it stands for the non-profits I'm involved with! And I wish I had more time and PHP skills to contribute back more, maybe I'll work on both those in time and input back in in terms of code as well as other ways.

Thanks for all the support though!

Dave

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: Contacts in Group A AND Group B
April 14, 2011, 10:14:44 am

Would be good to make this list and post on the forum (maybe under feature requests and suggestions?)

As you get more involved / learn more, you can go back to the list and start knocking off some items from that

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

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: Contacts in Group A AND Group B
April 14, 2011, 10:16:40 am

Note that search builder is on "life support". We are basically only doing essential fixes to it, but are not adding any new features and/or extending the current feature set.

Would be great if folks in the community who are interested in extending / improving it, can take it over and inject new life into it!

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

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contacts in Group A AND Group B
April 14, 2011, 04:44:50 pm
We'll remove the custom search sub-menu from the default navigation for new installs:
http://issues.civicrm.org/jira/browse/CRM-7919
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Contacts in Group A AND Group B

This forum was archived on 2017-11-26.