| home -> documentation -> language reference -> NullValue property |
Description
The NULLVALUE property is used to replace the NULL value of a dataset field with the specified value.
Syntax
<#DATASET ALIAS="anAlias" QUERYID="aQueryId">
<#field1 NULLVALUE="ValueInsteadOfNull"/>
<#/DATASET>
|
Applications
Use the NULLVALUE property to display some text when some DATASET field has null values.
|
Note: The NULLVALUE will be inserted only if the filed is actually NULL. This is not the case when the field contains an empty string ('').
|
Examples
Example 1. Usage of the NULLVALUE property.
Source code
NULLVALUE property example This table shows all the information stored on the contacts table. Notice that the value "(unknown)" appears on null fields. User Name | e-mail | Phone number | <#DATASET ALIAS="OPEX" QUERYID="19"> <#USERNAME/> | <#EMAIL/> | <#PHONE NULLVALUE="(Unknown)"/> | <#/DATASET>
|
SQL Sentence No. 19
CONTACTS table.
CREATE TABLE "CONTACTS" ( "USERNAME" VARCHAR(128) NOT NULL, "EMAIL" VARCHAR(128) NOT NULL, "PHONE" VARCHAR(32) );
|
Test example
|