Operations

Last updated on
30 November 2019

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

Rules has many features for calculations, conversions, & transformations with support for complex logic on several data types. This can be very useful for general data manipulation, commerce, and data importing/exporting. Some of the ongoing development of these features are in issues tagged data transforms

Math

  • logic operations (+,-,×,÷)
  • rounding :: up [ceiling], down [floor], remainder [modulus]
  • type conversion for numbers, integers, and strings
  • comparison :: is greater than, is less than, is equal to, contains)

Text

  • convert to upper / lower case
  • trim string
  • strip tags
  • encode / decode html entities
  • reverse text
  • sort & reverse sort lists (numerically and alphabetically)

Note: These actions are currently in development in Action: transform text and, in the meantime, are available in Rules Data Transforms

Date / Time

  • comparison :: is before, is after, is on

Note: This feature is currently in development in Condition: date/time comparison.

Help improve this page

Page status: No known problems

You can: