AgileApps Support Wiki Pre Release

Difference between revisions of "Introduction to Expressions"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 13: Line 13:
:*[[Formula Functions]] can also be included in expressions. For example, to round the result of the previous expression to the nearest 2 decimal places:
:*[[Formula Functions]] can also be included in expressions. For example, to round the result of the previous expression to the nearest 2 decimal places:
::<tt>ROUND( amount * 0.02, 2)</tt>
::<tt>ROUND( amount * 0.02, 2)</tt>
<noinclude>
[[Category:Learning Resources]]
</noinclude>

Revision as of 22:58, 28 January 2013

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)