Category:

Miscellaneous

Returns one value if a specified condition evaluates to True, or another value if it evaluates to False.

Syntax

iif(
  Condition Boolean,
  x <AnyType>,
  y <AnyType>
): <AnyType>

Parameters

Condition is the value to check.

x is the value that is returned if condition evaluates to True.

y is the value that is returned if condition evaluates to True. Its type must match the type of x.

Return value

Type: <AnyType>.

Examples of using

iif(dataset_field_val(1, 'Salary') > 2000, 200, 0)