VBO and Rules - Rules doesn't grab modified CCK field's values

Events happening in the community are now at Drupal community events on www.drupal.org.
ayesh's picture

Hello everyone,
I've setup a Views Bulk Operation page to modify a CCK number field on multiple nodes. Also I have a Rule set, on event "after updating existing content".

I want to update another (number)field in the modified node as soon as I update this CCK number field.

When I change the value of the CCK field using VBO, the Rule actually triggers. But it grabs the value of unchanged content. I'm already using tokens of "Saved content"
If I save the content again (Using VBO-provided "Save node" action), now Rule grabs new value.

Can anyone lighten me up what I'm missing or doing wrong here ?

Thanks!

Comments

Saving nodes

itangalo's picture

To save execution time, Rules waits with saving content until all rules have been run. This is good most times you want to change several fields in a node, but in your case it isn't very helpful.

The way to work around this is to use the action "save content" (or something like that), and also check the box "force immediate saving". This will force Rules to save the node at the end of the current rule – so the next node will have the updated field values to work with.

Good luck!
//Johan Falk

Thanks Johan!

ayesh's picture

I actually thought Rules save the content immediately when intelligent-save is on.
I'll try and let you know!

and thank you VERY much for showing me a way!

Just tried it and worked

IWasBornToWin's picture

Just tried it and worked well. I'm creating a new content type and then referring to the id of that type. Had to do ltangalo's suggestion - worked well!

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: