Choose where you’d like to start

isEmpty

Overview

The isEmpty function takes an expression as argument. It returns true if the value resolved by the expression is empty. Otherwise, it returns false.

Note: Please refer to the differences between isBlank(), isNull() and isEmpty() and how data can be validated.

Return Type

  • BOOLEAN

Syntax

<variable> = <expression>.isEmpty();

where,

ParameterData typeDescription
<variable>BOOLEANVariable which will contain the returned boolean value.
<expression>TEXT/LIST/MAP/COLLECTIONVariable which will hold the expression awaiting the empty validation.

Examples

 listVar = {"Projects", "Mail", {"Zoho Creator", "Zoho CRM"}};
 info listVar.isEmpty(); //returns false
 collVar = Collection();
 info collVar.isEmpty(); //returns true
 mapVar = Map({"key1":"value1", "key2":"value2"});
 mapVar = {};
 info mapVar.isEmpty(); //returns true
 textVar = " ";
 info textVar.isEmpty(); //returns false

Get Started Now

Execute