AND and OR (groups)

Last updated on
5 April 2020

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

It's possible to combine conditions or actions by using AND and OR groups to perform multiple conditions or multiple actions together. It is a faster method of building the same type of functionality that is available in components.

The configuration is basically the same for actions or conditions. For conditions, this is done in the following way:

  1. In the condition section of the rule configuration, click the "Add and" or "Add or" links. This will create a new logical group for your conditions.
  2. Continue creating new conditions as usual. Click and drag to indent the conditions you want in a logical group under that particular group.

A more detailed explanation is available in the video tutorial, Combining conditions and below are some notes.

  • It is possible to place logical groups inside other logical groups, to create more complex conditions.
  • By default, Rules assumes AND operators between conditions (if no OR group is explicitly used).
  • If you want to use complex conditions in more than one place, consider creating a condition set component.

Help improve this page

Page status: No known problems

You can: