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) »
  • Using a group of contacts for a custom data field
Pages: [1]

Author Topic: Using a group of contacts for a custom data field  (Read 683 times)

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Using a group of contacts for a custom data field
January 06, 2010, 05:49:59 pm
I'd like to create a custom data field that uses the contacts within a Group as it's data.

I see similar functionality through civi.  For example when creating a new relationship, the "Find Contact" is a drop down of contacts.
 
What is the best way to approach this?

Thanks again.

Paul

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: Using a group of contacts for a custom data field
January 06, 2010, 07:23:28 pm

use a contact reference custom field and then use the contactListQuery hook:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmcontactListQuery

to restrict the set of contacts to a specific group only

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

pkeogan

  • I post frequently
  • ***
  • Posts: 130
  • Karma: 4
    • BackOffice Thinking
Re: Using a group of contacts for a custom data field
January 07, 2010, 04:38:58 am
Thanks that worked.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Using a group of contacts for a custom data field

This forum was archived on 2017-11-26.