IFNULL
Usage
Use this function to set a default value if the argument value is NULL
Category | Function | Type | Where to use | Argument statement |
---|---|---|---|---|
FUNCTION | SERVER ROW | CONDITIONAL | .VALUE |
Syntax
1 |
|
Arguments
Value_To_Check
any cell value (#Storage_Name.Field_Name.VALUE
or .OLDVALUE
), constant, System Variables or function-returned value
Default_Value
any cell value (#Storage_Name.Field_Name.VALUE
or .OLDVALUE
), constant, System Variables or function-returned value
Note
This function is mainly used as argument in SERVER FUNCTIONS such as EQ NEQ ... It can be used also in CLIENT FUNCTIONS such as CELLEQ, CELLNEQ, ... if the arguments are not depending on any record's fields value
Return Value
Value
Examples
Example 1
Formula
=IFNULL(#StorageExample.Number.VALUE; 0)
Description
Formula checks if the cell values of the field Number in the StorageExample are null; if the condition's result is true returns 0 as default value
Result
0 or another value
Example 2
Formula
=IFNULL(#StorageExample.Number.VALUE; =MAX(#StorageExample; #StorageExample.Number) + 1)
Description
Formula checks if the cell values of the field Number in the StorageExample are null; if the condition's result is true returns the max (MAX function) value of the field Number adding 1 as default value
Result
max + 1 or another value