When saving the values of a CDT to a database, a NULL value is not stored as NULL - instead, it is stored as an empty string ‘’.
Appian converts any NULL values of a CDT text field into an empty string. Writing an empty string to the database is safer than writing NULL value; a NULL value if not handled correctly can lead to NULL pointer exceptions.
When comparing values returned from a data store, use lenb() to check the length in bytes is 0 which would be the equivalent of a NULL value. More information on the lenb() function can be found here.
This article applies to all versions of Appian.
Last Reviewed: March 2017
© 2020 Appian. All rights reserved.