K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Build Expression

Inline Functions - Build Expression

Contextualized Assistance:

The Expression Wizard is opened from either selecting the Expression function from the Context Browser > Function Browser or by clicking on the button on a Function Wizard screen. The Expression Wizard enables a user to build expressions that perform operations and return values.

The expression builder includes a set of operators and functions for use in the Build Expression wizard. An expression can use a single function, but typically an expression combines functions with operators and uses multiple functions.

List data types cannot be used with the expression builder. Examples of list data types are binary data fields, XML repeating sections, SmartObject lists and functions returning arrays or binary (array of bytes).

The following functions cannot be used in the Expression builder:

Feature Function
Conversion

To Binary - Return type: array of bytes.

To Bytes - Return type: array of bytes.

InfoPath Get Attachment Content - Return type: array of bytes.
Text
Split - Return type: array of strings.

Fig. 1. Build Expression

An operator is added to the Build Expression canvas by clicking on the specific operator button, or by typing it in directly. Parenthesis can also be added to the Build Expression canvas by clicking on the ellipses button.

To distinguish between Text and Numeric values, quotes (single or double) are used for Text.
For example:
When using & for joining text strings, “abc” & “def” will give a result of “abcdef”
When using + for adding numeric values, 1.0 + 2.0 will give a result of 3.0

The supported operators are categorized as follows:

Category Operators Description
Mathematical =, <, >, +, -, *, /, ^ , <=, >=

equal, less than, greater than, plus, minus, multiply, divide, power of, less than or equal to, greater than or equal to

Text & Concatenates strings (including static values such as "<space>") together
Logical =, <>, And, Or, Xor equal, not equal, and, or, xor
Date and Time =, <, >, <=, >= equal, less than, greater than, less than or equal to, greater than or equal to

BODMAS

The expression builder adheres to BODMAS (Brackets, Over, Divide, Multiply, Add, Subtract) rules.

Expressions are evaluated in the following order:

Example:

The expression 1 + 2 * 3 will result in multiplying 2 and 3 first, before adding 1 to the result. Furthermore Boolean and comparison operations happen before any mathematical ones. For instance the expression 2 > 5 + 1 will fail the validation check because the Boolean operation greater than is evaluated before the addition, which will result in trying to add a false value and 1.

Types of operators

See Also

 

 


K2 blackpearl Help 4.6.10 (4.12060.1690.0)