Introduction to Expressions
From LongJump Support Wiki
Revision as of 00:08, 2 June 2012 by imported>Aeric
An expression is any valid set of literals, variables and operators that evaluates to a single value, which is used to build Filter criteria or Formulas. The resulting value can be a number, a string, a date/time, or a Boolean (Logical: TRUE/FALSE).
The simplest expressions are called primary expressions and refer to the value of a literal, variable, or formula function. These are examples of primary expressions:
- 972 (a numeric literal)
- 'Steve' (a string literal)
- creation_date (a variable value)
- TODAY (a formula function that returns the current date)
- Examples
-
- Primary expressions can be combined with operators--for example, to multiply a variable by a literal value:
- amount * 0.02
- Formula Functions can also be included in expressions. For example, to round the result of the previous expression to the nearest 2 decimal places:
- ROUND( amount * 0.02, 2)