Community Documentation

Operations

Last updated September 27, 2012. Created by mitchell on April 18, 2012.
Log in to edit this page.

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.

About this page

Drupal version
Drupal 7.x
Audience
Programmers, Site administrators, Site users
Level
Intermediate
Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.