Answers.Body: <p>First part is easy. When you check the box 'modify entity values' in the VBO field, you should see an option to tick another box that says 'override label'. That lets you then set the button that users will see to be 'Disable relationships'.</p>
  
  <p>The second bit - i think it would require more code for CiviCRM Entities module or <a href="https://github.com/eileenmcnaughton/civicrm_entity_actions" rel="nofollow">civicrm_entity_actions</a>. I say this because on a VBO i set up recently I had the option to tick both 'Add to Group' and 'Remove from Group' (and there was also 'modify entity values') - so it sounds like you need the options for 'Enable Relationship' and 'Disable Relationship' to be explicit options at that step.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T20:44:30.730Z
Answers.Text: Thanks - I don't see any options for 'Add to Group' or 'Remove from Group' but they sound like a good start for creating something for the relationships.  Did you have something custom to provide those?
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T21:14:16.027Z
Answers.Text: Nothing custom - using CiviCRM Entity module but assume you are too. I think the options you see will depend on the base table for the View. In my case this is CiviCRM Contact - assuming in yours it is CiviCRM Relationship. yes?
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T21:53:34.813Z
Answers.Text: Yes, I'm using CiviCRM Entity.  Mine is also using Contacts as the base.  I've tried using different base tables but the options are all the same so far.  Which version of CiviCRM Entity are you using?  I've tried 7.x-2.0-beta1 and 7.x-2.x head from github.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T22:26:13.153Z
Answers.Text: oh. sorry.  am also using civicrm_entity_actions from https://github.com/eileenmcnaughton/civicrm_entity_actions
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-10T13:06:56.743Z
Answers.Text: Many thanks Pete - that's the missing bit.  I've hacked in a 'Disable relationship' which is working nicely.  I'll PR it when I'm done.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-10T20:11:56.240Z
Answers.Text: ok - sounds good - so outcome would be that you can add/remove many-to-one relationships? If you need to have it use an autocomplete for finding 'contact b' i think we have some code that will do that.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-09T19:05:52.100Z
Answers.LastActivityDate: 2016-06-09T22:27:18.883Z
Answers.LastEditDate: 2016-06-09T22:27:18.883Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>I'm trying to create a View of people with relationships to an organisation with options to disable those relationships.  I have created the view and added a VBO field on the relationship.</p>
  
  <p>In the Selected Bulk Operations section, I have selected Modify Entity Value and then in the display section selected Relationship is Active.
  <a href="https://i.sstatic.net/FerTS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FerTS.png" alt="enter image description here"></a></p>
  
  <p>The view then shows a 'Modify entity values' and after clicking that button I get a text box to enter the value of Relationship is Active.  Entering '0' and submitting then has the intended effect of disabling the relationship in Civi.</p>
  
  <p>But ... what I really want is the button to say "Disable relationship(s)" and when clicked to set the Relationship is Active to 0 without asking the user for a value.</p>
  
  <p>How can I achieve that?  (Drupal 7, CiviCRM 4.6.18, civicrm_entity 7.x-2.0-beta1)</p>
  
Tags: <drupal-views><civicrm-entity>
Title: How to configure Views VBO action to disable relationships?
ThreadText: # How to configure Views VBO action to disable relationships?
  
  (Asked by: username_0 on 2016-06-09)
  
  I'm trying to create a View of people with relationships to an organisation with options to disable those relationships. I have created the view and added a VBO field on the relationship.
  
  In the Selected Bulk Operations section, I have selected Modify Entity Value and then in the display section selected Relationship is Active.
  [![enter image description here](https://i.sstatic.net/FerTS.png)](https://i.sstatic.net/FerTS.png)
  
  The view then shows a 'Modify entity values' and after clicking that button I get a text box to enter the value of Relationship is Active. Entering '0' and submitting then has the intended effect of disabling the relationship in Civi.
  
  But ... what I really want is the button to say "Disable relationship(s)" and when clicked to set the Relationship is Active to 0 without asking the user for a value.
  
  How can I achieve that? (Drupal 7, CiviCRM 4.6.18, civicrm\_entity 7.x-2.0-beta1)
  
  **Tags:** drupal-views, civicrm-entity
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-09. Score: 2 | Accepted answer
  
  First part is easy. When you check the box 'modify entity values' in the VBO field, you should see an option to tick another box that says 'override label'. That lets you then set the button that users will see to be 'Disable relationships'.
  
  The second bit - i think it would require more code for CiviCRM Entities module or [civicrm\_entity\_actions](https://github.com/eileenmcnaughton/civicrm_entity_actions). I say this because on a VBO i set up recently I had the option to tick both 'Add to Group' and 'Remove from Group' (and there was also 'modify entity values') - so it sounds like you need the options for 'Enable Relationship' and 'Disable Relationship' to be explicit options at that step.
  
  > **Comments:**
  > **username_0**: Thanks - I don't see any options for 'Add to Group' or 'Remove from Group' but they sound like a good start for creating something for the relationships.  Did you have something custom to provide those?  
  > **username_1**: Nothing custom - using CiviCRM Entity module but assume you are too. I think the options you see will depend on the base table for the View. In my case this is CiviCRM Contact - assuming in yours it is CiviCRM Relationship. yes?  
  > **username_0**: Yes, I'm using CiviCRM Entity.  Mine is also using Contacts as the base.  I've tried using different base tables but the options are all the same so far.  Which version of CiviCRM Entity are you using?  I've tried 7.x-2.0-beta1 and 7.x-2.x head from github.  
  > **username_1**: oh. sorry.  am also using civicrm_entity_actions from https://github.com/eileenmcnaughton/civicrm_entity_actions  
  > **username_0**: Many thanks Pete - that's the missing bit.  I've hacked in a 'Disable relationship' which is working nicely.  I'll PR it when I'm done.  
  > **username_1**: ok - sounds good - so outcome would be that you can add/remove many-to-one relationships? If you need to have it use an autocomplete for finding 'contact b' i think we have some code that will do that.  
  
  ---
  
  