Calculated fields in data blocks use expressions that specify the operations and functions to be performed, the referenced attribute fields, and any needed value conversion. The tables below show the operations and functions that can be used in expressions of calculated fields.

For defining calculated fields it is assumed that you have some familiarity with scripting.

Operations

The following operations can be used in the expression of a calculation field:

NotationOperationExplanation 
+Add

Adds the operands. If both operands are integer, the result is also integer. Otherwise the result will be real.

Example: 2+3 results in 5

-Subtract

Subtracts the right operand from the left. If both operands are integer, the result is also integer. Otherwise the result will be real.

Example: 2-1 results in 1

*Multiply

Multiplies the operands. If both operands are integer, the result is also integer. Otherwise the result will be real.

Example: 2*3 results in 6

/Divide

Divides the left operand by the right. If both operands are integer, the operation will perform integer division and the result is also integer. In all other cases, the operation will be a proper division and the result will be real.

Examples:

4/3 results in 1

4.0/3 results in 1.33

Functions

The following predefined functions can be used in the expression of a calculated field:

NotationFunctionExplanation
minMinimumReturns the smallest value among its arguments.
maxMaximumReturns the largest value among its arguments.
sumSumReturns the sum of its arguments.
prodProductReturns the product of its arguments.
avgAverageReturns the arithmetic average value of its arguments: the sum of the values divided by the number of values.
geomanGeometric meanReturns the geometric mean value of its arguments: the N-th root of the product of the values (with N equal to the number of values).
sqrtSquare rootReturns the square root of its (single) arguments.
absAbsolute valueReturns its (single) argument unchanged if it 

Parentheses and brackets

NotationOperationExplanation 
( )Parentheses

Can be used for specifying the order of operations.

Example: 2*(3+4) results in 14

< >Angle brackets

Can be used for referencing other attribute fields.

Example: 2.0*<licensecosts> + 3.0*<maintenancecosts>