I am trying to create a rule which fires after modifying node content. Specifically I want to modify the entity reference field values of all the node entities provided by VBO. So I created a rule and a component as shown in the images below. My problem is that I can not find a way to empty the entityref list of all node entities before the loop, maybe my whole approach is wrong.

Rules Configuration Rules Configuration

  • Please attach your images to your post using the "Add image" button rather than linking to an external site. That way, future visitors can have guaranteed access to the images because they will be stored with the Drupal Answers site. – Patrick Kenny May 10 '12 at 14:50
  • 1
    I cannot upload pictures that way because i do not have the required reputation points but as soon as i reach 10 points i will upload them here. – marinoszak May 10 '12 at 19:19
  • you could hook_node_update instead and an entityfieldquery to look up the entities you want instead of using VBO – Andrew Welch Apr 4 '13 at 9:35

I'm not sure what the Change combine with field action does but if you want to set the value of an entity reference field can't you just use the "Set a data value" action in your product_display loop for the entity reference field?

  • I think the same "Set a data value" action should work. Just set value to nothing – milkovsky Oct 23 '13 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.