Supported Functions in the Expression Builder

In this Topic

    1. Math and Number Based Functions
    2. Data Access Function

Calculations and formulas entered in the Expression Builder must use the appropriate functions and correct Python syntax. The system supports full IronPython functionality. The following sections list supported functions that are useful when working with the Expression Builder.

For more information, see Using the Expression Builder and Working with Formulas.

Math and Number Based Functions

 

Method Name

Parameters

Return Type

Description

Abs

(float src)

float

Absolute value

ACos

(float src)

float

Arc cosine of an angle

ASin

(float src)

float

Arc sine of an angle

ATan

(float src)

float

Arc tangent of an angle

Avg

(float[] list)

float

Average of the values of the column

Ceiling

(float value, float significance)

float

Smallest whole number that is greater than or equal to a specified limit

Cos

(Number src)

float

Cosine of an angle

Count

(float[] list)

int

Total number of rows

Exp

(float src)

float

Exponential (to the specified power)

Fact

(int factor)

int

Factorial of a number

IsNumber

(str numStr)

bool

Value is valid number

Log

(float src)

float

Natural logarithm of a number

LogTen

(float src)

float

Base 10 logarithm of a number

Max

(float[] list)

float

Maximum value

Median

(float[] list)

float

Median of the values

Min

(float[] list)

float

Minimum value

Mod

(int num, int den)

int

Remainder (modulus) of a division operation

Number

(str numStr)

float

Converts the string to valid number

Pi

()

float

Multiplies pi by a specified number

Round

(float src, float decimals)

float

Rounds a number to the specified number of decimal places

SafeNum

(float? val)

float

Gets the Number Val or defaults to 0 if Value is None

Note: The SafeNum function returns a zero or a default number if the field referenced is null. In order to skip the calculation using a field when it is null, a conditional statement can be used. For example: If Entity.Field is not None: <your calculation here>

SafeNum

(float? val, float defaultValue)

float

Gets the Number Val or Default Value if Val is None

Note: The SafeNum function returns a zero or a default number if the field referenced is null. In order to skip the calculation using a field when it is null, a conditional statement can be used. For example: If Entity.Field is not None: <your calculation here>

Sin

(float src)

float

Sine of an angle

Sqrt

(float src)

float

Square root of a number

StDev

(float[] measurements)

float

Standard deviation of a data set

StDevP

(float[] measurements)

float

Standard deviation of a population from which your data is a sample

Sum

(float[] list)

float

Sum of the values

Tan

(float src)

float

Tangent of an angle

Trunc

(float value, float places)

float

Truncates a number to the specified number of decimal places

Var

(float[] measurements)

float

Variance for the specified column

Data Access Function

The LoadProperty method can be used to retrieve a value from the specified entity. The notation [T] is used to represent .NET generic types in Python.

Method Name

Parameters

Return Type

Description

LoadProperty[T]

(T entity, str navigation property)

No return type (void)

Loads a child entity onto the entity that is passed in (T entity).

Related topics:

Working with Formulas

 

Blue bar indicating the end of the topic