|Navigation: Language Reference > 4 - Entity Declarations > File Structures >====== Null Data Processing ======|
The concept of a null “value” in a field of a FILE indicates that the user has never entered data into the field. Null actually means “value not known” for the field. This is completely different from a blank or zero value, and makes it possible to detect the difference between a field which has never had data, and a field which has a (true) blank or zero value.
In expressions, null does not equal blank or zero. Therefore, any expression which compares the value of a field from a FILE with another value will always evaluate as unknown if the field is null. This is true even if the value of both elements in the expression are unknown (null) values. For example, the conditional expression Pre:Field1 = Pre:Field2 will evaluate as true only if both fields contain known values. If both fields are null, the result of the expression is also unknown.
Known = Known !Evaluates as True or False
Known = Unknown !Evaluates as unknown
Unknown = Unknown !Evaluates as unknown
Unknown <;> 10 !Evaluates as unknown
1 + Unknown !Evaluates as unknown
The only four exceptions to this rule are boolean expressions using OR and AND where only one portion of the entire expression in unknown and the other portion of the expression meets the expression criteria:
Unknown OR True !Evaluates as True
True OR Unknown !Evaluates as True
Unknown AND False !Evaluates as False
False AND Unknown !Evaluates as False
Support for null “values” in a FILE is entirely dependent upon the file driver. Some file drivers support the null field concept (SQL drivers, for the most part), while others do not. Consult the documentation for the specific file driver to determine whether or not your file system's driver supports nulls.