This documentation relates to CiviCRM version 3.3. It's not maintained anymore.
Current version of documentation.

Related contact search (searching through relationships)

Aller directement à la fin des métadonnées
Aller au début des métadonnées

This page refers to outdated version of CiviCRM. Check current version of documentation.


Documentation Search


CiviCRM 3.3 Documentation

Support and Participation

Developer Resources


CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

This search is designed to be a general framework that allows people to search through contacts.

e.g.

  • parents of children that played football last year
  • finance officers at organisations that are interested in childcare
  • all people that work at organisations with an income of over £100,000
  • vicars at churches in manchester

and so on.

Speaking in CiviCRM terms, this should allow a user to select a list of contacts based on

  • data about those contacts
  • the fact that those contacts have a relationship
  • data about related contacts.

A quick trawl of the forums suggests that this is often asked for functionality.  The suggestion is often a custom search but it appears that none has been implemented and made publicly available, e.g.

Specification

User interface and workflow

option 1

I think the most simple interface here would be something along the lines of a custom search screen that has three drop down menus

  • group A
  • relationship type
  • group B

The user would first create the two groups if needed.

They would then go to the custom search page, and select the desired groups and relationship type and hit search

Results would be those contacts from group A that are related by the specified relationship type to contacts in group B.

option 2

please add alternative suggestions as to how this could work.

XD: in most of my needs, it was either something complex (find all contacts employed by an organisation taged A AND B), or where the address is in this country or that country...

What I felt missing was an advanced search where you only put the relationtype eg. find all the contact that have a relationship "Accountant for", no matter what organisation. As for what I want to do to all the accountants, I'm going to keep silent and wait for my lawyer...

The other was to be able to advanced search where I can put the id of the contact, not only having an autocomplete (might be because the autocomplete doesn't work very well).

Doing a smart group with that queries and doing search on group A but not group B and so on would be quite powerful and cover most of the simple needs. For the most complex one, I expect having to resort to custom searches anyway.

Comments

Seems like I can't add comments.  Agree Lobo that second group is optional.  Might often be all employees of an organisation that works with the bangladeshi community, but it won't always be.  For example, all employees of organisations that have an income of over £100,000 that are subscribed to our e-newsletter /  have the VIP tag, etc.

Étiquette
  • Aucun
  1. Feb 16, 2011

    Can u explain a bit more on why Group B is needed? I would keep Group B optional, and if present, restrict the search results to all contacts who are in Group B (i.e. Group B serves as a filter and if missing its basically the set of all contacts)


Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.