Introduction to Expressions

From AgileApps Support Wiki
Revision as of 01:05, 10 May 2014 by imported>Aeric

An expression is any valid set of literals, variables and operators that evaluates to a single value.

An expression is used to build Filter criteria or a Formula.

Two different kinds expressions are used in the platform:

  • Filter Expressions
  • Used to select records.
  • The value of the expression is always a Boolean (true or false) value.
  • Expressions are created using fields, values, comparison operators, and logical operators.
  • Simple field selector
  • No functions.
  • Formula Expressions
  • Used to return a value.
  • The resulting value can be a number, a string, a date/time, or a Boolean (Logical: TRUE/FALSE).
  • A wide variety of Formula Functions are available.
    For example:
ROUND( amount * 0.02, 2) (rounds the variable to the nearest 2 decimal places)
  • Fields in Lookup target records can be referenced
  • Logical operations are done with functions AND() and OR()

The simplest expression is a literal value, a variable, or a formula function:

  • 972 (a numeric literal)
  • 'Steve' (a string literal)
  • creation_date (a variable value)
  • TODAY (a formula function that returns the current date)

More complex expressions are created by combining values with operators. For example:

amount * 0.02