Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Function*Description
NOT(expression)Boolean negation, 1 (means true) if the expression is not zero
IF(condition,value_if_true,value_if_false)Returns one value if the condition evaluates to true or the other if it evaluates to false
RANDOM()Produces a random number between 0 and 1
MIN(e1,e2)Returns the smaller of both expressions
MAX(e1,e2)Returns the bigger of both expressions
ABS(expression)Returns the absolute (non-negative) value of the expression
ROUND(expression,precision)Rounds a value to a certain number of digits, uses the current rounding mode
FLOOR(expression)Rounds the value down to the nearest integer
CEILING(expression)Rounds the value up to the nearest integer
LOG(expression)Returns the natural logarithm (base e) of an expression
SQRT(expression)Returns the square root of an expression
SIN(expression)Returns the trigonometric sine of an angle (in degrees)
COS(expression)Returns the trigonometric cosine of an angle (in degrees)
TAN(expression)Returns the trigonometric tangens of an angle (in degrees)
SINH(expression)Returns the hyperbolic sine of a value
COSH(expression)Returns the hyperbolic cosine of a value
TANH(expression)Returns the hyperbolic tangens of a value
RAD(expression)Converts an angle measured in degrees to an approximately equivalent angle measured in radians
DEG(expression)Converts an angle measured in radians to an approximately equivalent angle measured in degrees
FORMATDATE(expression)Formats date (timestamp) using date format configured in Confluence
FORMATDATETIME(expression)Formats datetime (timestamp) using datetime format configured in Confluence
NOW()Useful for tracking last updated timestamps (could be used together with FORMATDATE or FORMATDATETIME) see below
FORMATFILESIZE(expressionvalue)Shows file size in MB and KB, instead of long value in bytes
FORMATMINSECAGO(expressionvalue)Shows minutes and seconds ago since the given timestamp
FORMATHOURMINSECAGO(expressionvalue)Shows hours, minutes and seconds ago since the given timestamp
FORMATDAYSAGO(expressionvalue)Shows days ago since the given timestamp
USER()Returns current user full name
USERNAME()Returns current user username
EMPTY(value)Checks if given value is empty
NOTEMPTY(value)Checks if given value is not empty
LEN(value)Calculates length for given value (length = number of characters)
LENGTH(value)Same as LEN(value)
Warning

*Functions names are case insensitive.

Warning

For functions which work with text values and text values could potentially be empty then you must use quotes or double quotes for your parameters. For example:

  • IF(EMPTY("[entry.somefield]", "ERROR", "SUCCESS")
  • IF(LEN("[entry.someotherfield]")>1, "Good", "Not good at all")

 

Supported Constants

ConstantDescription
PIThe value of PI, exact to 100 digits
TRUEThe value one
FALSEThe value zero

...

IF(0, hi, bye)bye
IF([entry.somefield], hi, bye)depending on the field value: if 0 then "bye" will be outputted and "hi" otherwise
IF([entry.field1]+31, IF([entry.field2], 4, 12)*10, NA)also, depends on a values for fields field1 and field2
FORMATDATE(NOW())will print current date using Confluence date format

IF(EMPTY("[entry.somefield]", "ERROR", "SUCCESS")

will print ERROR if the value for field "somefield" is empty and SUCCESS if not empty

IF(LEN("[entry.someotherfield]")>1, "Good", "Not good at all")

will print Good if someotherfield's value is longer than 1 character (and if not then Not good at all is printed)