Scripting > UNICOM Intelligence Function Library > Miscellaneous functions > IsEmpty
 
IsEmpty
Returns True if the value is empty. An empty string is one that contains no characters or just contains white spaces. An empty category list is one that contains no categories. A NULL value is deemed to be empty. Unless NULL, other data types are always deemed to be not empty.
Syntax
IsEmpty(Val)
Parameters
Val
Type: None
Variant value to be tested.
(return)
Type: Boolean
True if Val is empty, otherwise False.
Remarks
If Val is NULL, the return value is True.
Examples
Function call
Value of Q1
Result
IsEmpty(Q1)
24 St John's Road, Barnes
False
IsEmpty(Q1)
 
True
Q1.IsEmpty()
{3}
False
Q1.IsEmpty()
{}
True
Q1.IsEmpty()
17.50
False
Q1.IsEmpty()
0.00
False
Q1.IsEmpty()
NULL
True
The address variable is a text variable that stores respondents' addresses. However, for some respondents the address has not been recorded and the variable stores an empty string. You could use the following to exclude those respondents:
NOT (address.IsEmpty())
See also
Miscellaneous functions