Answers.Body: <p>Graham, you can do this with CiviRules? Trigger should be when contact is added to group, condition specifies what group and the related action is to remove contact from group.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-11T09:16:22.697Z
Answers.Text: Thanks @ErikH, I'll certainly check it out, and will accept your answer.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-11T09:56:59.000Z
Answers.Text: Graham, we are thinking about a new extension: webform_civirules which would enable integration between Drupal webforms and CiviRules. So it would be possible to do thinks like 'if this webform is submitted and this field has the value xxx do this'. Think that would be useful and let me know if you can get funding :-)
Answers.UserDisplayName: ErikH - CiviCooP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-11T07:32:34.067Z
Answers.LastActivityDate: 2015-11-11T07:32:34.067Z
Answers.UserDisplayName: ErikH - CiviCooP
Answers.Body: <p>Graham made a feature request and we got this feature in the CiviCRM Entity module, for doing this with Drupal Rules</p>
  
  <p>Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group"</p>
  
  <p>This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged in.</p>
  
  <p>If you have the user object available in the Rule you can use the "Load or Create CiviCRM Contact" action, then the "Unassign Contact from Group" action to remove the contact from a group.</p>
  
  <p>This issue had some basic instructions:
  <a href="https://www.drupal.org/node/2854256" rel="nofollow noreferrer">https://www.drupal.org/node/2854256</a></p>
  
  <p>Get the dev version here: <a href="https://www.drupal.org/project/civicrm_entity/releases/7.x-2.x-dev" rel="nofollow noreferrer">https://www.drupal.org/project/civicrm_entity/releases/7.x-2.x-dev</a></p>
  
  <p>or beta7 or above when it comes out...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-23T04:09:08.623Z
Answers.LastActivityDate: 2017-02-23T04:09:08.623Z
Answers.UserDisplayName: jackrabbithanna
Body: <p>Webform_CiviCRM integration enables me to add contacts who submit a form to a Civi group. What I'd like to do is to remove them from another group at the same time, as part of a pipeline process. Drupal Rules module offers 'Remove contact from CiviCRM group' as an action, but I can't work out how to "select data of the type Contact" which seems to be what Rules is looking for in order to enable this action. How can I create a rule that removes a contact form a group based on the matched Drupal user submitting a webform (or perhaps based on the fact that the webform adds the contact to a group)?</p>
  
Tags: <webform-civicrm><groups><drupal-rules>
Title: How can I use Drupal Rules to remove a contact from a group
ThreadText: # How can I use Drupal Rules to remove a contact from a group
  
  (Asked by: username_0 on 2015-11-10)
  
  Webform\_CiviCRM integration enables me to add contacts who submit a form to a Civi group. What I'd like to do is to remove them from another group at the same time, as part of a pipeline process. Drupal Rules module offers 'Remove contact from CiviCRM group' as an action, but I can't work out how to "select data of the type Contact" which seems to be what Rules is looking for in order to enable this action. How can I create a rule that removes a contact form a group based on the matched Drupal user submitting a webform (or perhaps based on the fact that the webform adds the contact to a group)?
  
  **Tags:** webform-civicrm, groups, drupal-rules
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-11-11. Score: 4
  
  username_0, you can do this with CiviRules? Trigger should be when contact is added to group, condition specifies what group and the related action is to remove contact from group.
  
  > **Comments:**
  > **username_0**: Thanks @ErikH, I'll certainly check it out, and will accept your answer.  
  > **username_1**: username_0, we are thinking about a new extension: webform_civirules which would enable integration between Drupal webforms and CiviRules. So it would be possible to do thinks like 'if this webform is submitted and this field has the value xxx do this'. Think that would be useful and let me know if you can get funding :-)  
  
  ---
  
  ### Answer by username_2 on 2017-02-23. Score: 3
  
  username_0 made a feature request and we got this feature in the CiviCRM Entity module, for doing this with Drupal Rules
  
  Just added a rules action "Unassign contact from group" to the dev release of CiviCRM 2 days ago, along with "Assign contact to group"
  
  This will be in beta7 when it gets released in a couple of weeks, after some new PRs get tested and merged in.
  
  If you have the user object available in the Rule you can use the "Load or Create CiviCRM Contact" action, then the "Unassign Contact from Group" action to remove the contact from a group.
  
  This issue had some basic instructions:
  <https://www.drupal.org/node/2854256>
  
  Get the dev version here: <https://www.drupal.org/project/civicrm_entity/releases/7.x-2.x-dev>
  
  or beta7 or above when it comes out...
  
  
  ---
  
  