Show TOC

Background documentationConditional Functions Locate this document in the navigation structure

 

Function

Description

Syntax

Examples

BOOL

Evaluates a string with a logical value (ignoring case) and returns true when the string equals "true", "T", "yes" or "Y", or if it contains a non-zero number. Otherwise, it returns false.

BOOL(value)

BOOL('YES')

This expression would return true

BOOL('NO')

This expression would return false

BOOL(1)

This expression would return true

IF

Checks whether a specified condition is met. If it is, returns the first specified value; otherwise, returns the second specified value.

IF(text,expr1,expr2)

IF(@NET_PRICE>1000,'Expensive','Cheap')

If the expression in the field is TRUE (the value is greater than 1000), the value Expensive is returned. If the expression is FALSE (the value is less than 1000), the value Cheap is returned.

IF(@@=='DE','Germany','Other')

If the string DE is returned, the value returned is Germany. Otherwise, the value returned is Other

IF(@BANK_CTRY=='US',United States', IF(BANK_CTRY=='GB','England',IF(@BANK_ CTRY=='IL','Israel',IF(@BANK_CTRY=='DE', 'Germany','Other'))))

A nested IF expression defining display text for country names. If the value returned is USnot, GB, IL or DE, the value returned is Other

ISNULL

Returns TRUE if the value is a reference to an empty, undefined or null cell, otherwise, returns FALSE.

ISNULL(value)

IF(ISNULL(@@),'NO FAX NUMBER', @@)

If the value of the current cell is empty, the value returned is NO FAX NUMBER; otherwise, the value of the current cell is returned.

NVL

Returns the value of the first non-empty or undefined string in a given set of values. If all argument items are empty, returns an empty string.

NVL(string list)

NVL('a', 'b')

Returns the value of the first non-empty string in the set of values; in this case: a

NVL('', 'b')

In this case, the first string is empty, so that the value of the second item is returned: b