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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Changing custom fields based on a group?
Pages: [1]

Author Topic: Changing custom fields based on a group?  (Read 511 times)

rjm

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 6.28
Changing custom fields based on a group?
April 14, 2013, 08:30:57 am
Is it possible to change the contents of a custom field for a contact based on addition to a group?

I have smart groups controlled by custom fields.  I would like to clear two custom fields if the contact is moved into a certain group.

Is this possible and can anyone help me understand how this is done?

I know this is probably an idiot question, but I can't seem to get my mind wrapped around it.

Thanks for what ever you can offer.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Changing custom fields based on a group?
April 15, 2013, 06:58:37 am
This might be one of those questions where if you take a step back and explain what you are trying to do at a more business level, people can suggest an alternative approach.  Do you want to do that?

In any case, you can do this but only via a bit of coding (e.g. writing a small extension).

You'd find a hook that was fired every time someone joins a group and call the api to clear the two custom fields.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

rjm

  • I post occasionally
  • **
  • Posts: 86
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 6.28
Re: Changing custom fields based on a group?
April 16, 2013, 03:49:29 am
Thanks Michael,

I am using a custom field with names of volunteer committees within it.   This field is included in an event signup form for people to select the committee they wish to volunteer for.  I have a bunch of smart groups, each based on a volunteer committee contained in that field.  So when someone signs up for the event and volunteers for a committee, they are made a part of the smart group for that committee.

To further complicate the issue, I would like to restrict access to only certain committees for new volunteers.  So I created a second field with only those committees and did a search builder for those committee smart groups that bunches the two fields into one smart group.

The issue I am having is that I would like the chair person for that committee to be able to easily switch the volunteer out of that committee and into another.  For example, they aren't good for my committee but would be fine somewhere else, so let's put them into "anywhere you need help" committee.

I am looking for a one step process, out of one group and into another. 


Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Changing custom fields based on a group?
April 19, 2013, 10:03:23 am
Hey there,

I can't think of a simple way to do this.  CiviCRM doesn't with any out of the box solutions to it.  Doesn't mean you couldn't work one out but I can't think of one.

Sorry about that.
« Last Edit: April 19, 2013, 10:40:01 am by Michael McAndrew »
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Changing custom fields based on a group?

This forum was archived on 2017-11-26.