Posted by marcusx on July 3, 2011 at 12:39am
Hi!
Is it possible to loop through nodes with the Rules 2 for D7? This documentation says only something about looping through a multi value field. http://drupal.org/node/943962
I wwould like to go through all page content nodes and if the body field is empty the text from another textfield in the node should be copied. I tried to create an action set and selected "List of node items" in the variable settings. I see it in the loop data selector list but how can I populate this list?
Is there some further documentation?
Thanks for your help.
Regards
Marcus

Comments
VBO?
One way of approaching your problem is to use Views Bulk Operations to update your nodes. Views Bulk Operations allows you to run customized actions (such as Rules' action components) on selected nodes.
A brief outline:
Good luck!
//Johan Falk
**
Learn Drupal with Nodeone! Drupal 7 introduction | The Views module | Learn Page manager! | Drupal configuration learning curve | Learn Drupal coding | Rules for Drupal 6 | Theming Drupal 6 | 49 Drupal 6 modules you should know
Ahh ok thanks, I used it with
Ahh ok thanks, I used it with VBO before, but thought this is not neccessary any more with this loop stuff in 2.x. I will try again with vbo.
You might also use the
You might also use the database itself:
UPDATE node_revisions, content_field_article SET node_revisions.body = content_field_article.field_article_value WHERE node_revisions.vid = content_field_article.vid;
http://drupal.org/node/165370
Anietie Ekanem
Social Niche Guru Inc.
http://SocialNicheGuru.com
http://facebook.com/SocialNicheGuru