Date: Mon, 18 Oct 2021 10:09:22 +0300 (EEST) Message-ID: <1343739492.5908.1634540962057@wiki.vertuna.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_5907_1286693663.1634540962036" ------=_Part_5907_1286693663.1634540962036 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Supported math operators, formulas and functions

# Supported math operators, formulas and functions

### List of math operators and functions supported in = ConfiForms Field macro (calculated/formula fields and TableView Merger macr= o)

See examples below...

#### S= upported Operators

Mathematical Operators
Operator Description
- Subtraction operator
* Multiplication operator
/ Division operator
% Remainder operator (Modulo)
^ Power operator
Boolean Operators*
Operator Description
=3D Equals
=3D=3D Equals
!=3D Not equals
<> Not equals
< Less than
<=3D Less than or equal to
> Greater than
>=3D Greater than or equal to
&& Boolean and
|| Boolean or

*Boolean operators result always in a BigDecimal value of 1 or 0 (zero).= Any non-zero value is treated as a true value. Boolean not is implemented by a function.

#### S= upported Functions

Function* Description
NOT(expression)= Boolean negation, 1 (means true) if the expressi= on 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, us= es 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 exp= ression
SQRT(expression) Returns the square root of an expression
SIN(expression) Returns the trigonometric sine of an angle (in d= egrees)
ASIN(expression) Returns the trigonometric AS= IN of an angle
COS(expression) Returns the trigonometric cosine of an angle (in= degrees)
ACOS(expression) Returns the trigonometric AC= OS of an angle
TAN(expression) Returns the trigonometric tangens of an angle (i= n degrees)
ATAN(expression) Returns the trigonometric AT= AN of an angle
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 appr= oximately equivalent angle measured in radians
DEG(expression) Converts an angle measured in radians to an appr= oximately equivalent angle measured in degrees
FORMATDATE(expres= sion) Formats date (timestamp) using dat= e format configured in Confluence
FORMATDATETIME(ex= pression) Formats datetime (timestamp)= using datetime format configured in Confluence
NOW() Useful for tracking last updated t= imestamps (could be used together with FORMATDATE or FORMATDATE= TIME) see below
FORMATFILESIZE(va= lue) Shows file size in MB and KB, inst= ead of long value in bytes
FORMATMINSECAGO(value) Shows minutes and seconds ago sinc= e the given timestamp
FORMATHOURMINSECAGO(valu= e) Shows hours, minutes and sec= onds ago since the given timestamp
FORMATHOURMINAGO(value) Formats given timestamp value as a= string with hours and minutes
FORMATDAYSAGO(value= ) Shows days ago since the giv= en timestamp
FORMATDATEAS(value, format) Formats date in given format (form= at pattern should be ht= tps://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html= )
USER() Returns current user full name
USERNAME() Returns current user usernam= e
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 =3D number of characters)
LENGTH(value= ) Same as LEN(value)
FORMATNUMBER(value, format)

Where format is a pattern as de= scribed here https://docs.= oracle.com/javase/7/docs/api/java/text/DecimalFormat.html. Example: FOR= MATNUMBER([entry.f1], "###,###.00")

ZEROIFEMPTY("value") If value is empty, then it will be= passed further as 0. Useful when you might have an empty value for a field= but would like to format it with FORMATNUMBER function for example
EQUALS(value1, value2) Compares two values. Return true i= f values are equal and false otherwise
CONCAT("value1", "value2") Will concatenate values together i= nto one

*Functions names are case insensitive.

For functions which work with text values and text values could potentia= lly 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")

#### S= upported Constants

Constant Description
PI The value of PI, exact to 100 digits
TRUE The value one
FALSE The value zero

#### Examples:<= /h4> [entry.f1] + ([entry.f2] * <= span>[entry.f3]) Simple math expression, assuming f= 3 =3D 2, f2 =3D 1 and f1 =3D 5 the calculated value will be 7 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.fi= eld2], 4, 12)*10, NA) also, depends on a values for fiel= ds field1 and field2 FORMATDATE(NOW()) will print current date using Conf= luence 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) FORMATNUMBER([entry.f1], "##= #,###.00") when entry.f1 =3D 100 the outpu= t will be: 100.00when entry.f1 =3D 1100.01 the output will be:= 1,100.01 FORMATNUMBER([entry.f1], "##= #,###.##") when entry.f1 =3D 100 the outpu= t will be: 100when entry.f1 =3D 1100.01 the output will be: 1,100.01= FORMATNUMBER(ZEROIFEMP= TY("[entry.f1]"), "###,###.##") when entry.f1 is empty (noth= ing set), then 0 will be given to FORMATNUMBER function and the resul= t would be: 0 IF(EMPTY("[entry.somefield]"= , "ERROR", IF(EMPTY("[entry.anotherfield]", "ERROR", "SUCCESS")))) to check if both values for fields= "somefield" and "anotherfield" do present and set the label to "SUCCESS" (= and to "ERROR" otherwise)

------=_Part_5907_1286693663.1634540962036--