Difference between revisions of "Introduction to Expressions"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 5: | Line 5: | ||
:* <tt>'Steve'</tt> (a string literal) | :* <tt>'Steve'</tt> (a string literal) | ||
:* <tt>creation_date</tt> (a variable value) | :* <tt>creation_date</tt> (a variable value) | ||
;Examples: | ;Examples: | ||
Line 11: | Line 10: | ||
::<tt>amount * 0.02</tt> | ::<tt>amount * 0.02</tt> | ||
:*[[Formula Functions]] can also be included in expressions. For example, | :*[[Formula Functions]] can also be included in expressions. | ||
: | :: For example: | ||
::* <tt>ROUND( amount * 0.02, 2)</tt> rounds the result of the previous expression to the nearest 2 decimal places: | |||
:* <tt>TODAY</tt> is a formula function that returns the current date |
Revision as of 23:48, 9 May 2014
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. 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)
- 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:
- ROUND( amount * 0.02, 2) rounds the result of the previous expression to the nearest 2 decimal places:
- TODAY is a formula function that returns the current date