@IsNull (Formula Language)
Tests for a null value. Returns true only if a value is a single text value that is null, otherwise it returns false. This function also returns false if the value is an error.
Note: This @function is new with Release 6.
Syntax
@IsNull( value )
Parameters
value
Any data type. Any value.
Return value
flag
Boolean
- Returns 1 (True) if the value is a text value that is null
- Returns 0 (False) if the value is not a text value, not null, or is an error
Usage
This function is useful for checking for empty fields before using them in other functions in which they might generate errors.
Examples
This function, when used as a field formula, finds the square root of each element in the text list in the OriginalList field. @IsNull is first used to test the OriginalList field to ensure that it contains a value and prevents the formula from calculating the square roots if it does not. If OriginalList contains 4: 25, the result is 2; 5. If OriginalList is a null field, the result is a null field, not an error.@If(@IsNull(OriginalList); @Nothing;
@Transform(OriginalList; "x";
@If(x >= 0; @Sqrt(x); @Nothing)))