Site Building

Lists and Loops for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Alternate resources

Rules guide (Drupal.org)

Sprout Video

This tutorial shows how to manage lists in Rules – data types corresponding to arrays of other data types. It covers:

  • How to loop through multiple-value data in Rules, to act on each individual data entry
  • That lists are their own data types in Rules
  • That each primary data type automatically gets a list type as well
  • How to add data to lists
  • How to only add data if it is not already present
  • How to select whether to add new data to the start or end of the list
  • How to load new entities into Rules (by id)
  • A few words about other ways of fetching entities, such as by property or with Views (through VBO or Rules Bonus Pack)
  • That Rules configuration are actually entities
  • How to disable reaction rules

Additional resources

Rules guide (Drupal.org)

Legacy Site Building