About Null Values
•Setting a Field Value to Null
•Using Built-In Functions to Test for Null
Initial Value for Fields
For all of the major field types (Boolean fields, number fields, DateTime fields, text fields, currency fields, and link fields), the initial value is null if the field is nullable. It remains as a null value when you save the record unless you manually set the value or the value is set by an available rule (such as an initialization rule or saving rule).
Setting a Field Value to Null
In an expression, the single value null is represented by a case-insensitive keyword called null. To properly set a field value to null, use $(null), where null is case insensitive.
Null Value Comparison
Null compared with anything is null.
Using Built-In Functions to Test for Null
About Testing for Null
You cannot test for null by entering the following:
$(if TestBool == null then "The logical field is null" else "The logical field is not null")
One way to approximately perform null comparisons is to use the nvl() function. The syntax of the nvl() function is as follows:
If the value of the expr1 parameter is null, the function returns the value of the expr2 parameter; otherwise, the function returns the value of the expr1 parameter. For example, the expression can be used as follows:
If the TestBool parameter has a value of null, the function returns an empty string; otherwise, the function returns the value of the TestBool parameter (in this case, true or false).
To test for a null value, we recommend using the IsNull function. Here are two examples:
IsNull("This is a test")
In the above example, the application returns false, because the input parameter is not null.
In the above example, the application returns true, because the input parameter is null.