ISNOTEMPTY
Returns true if the expression is not empty.
- Strings passed into the function are checked if they are not an empty string.
- If an array is passed into the function, the function will return true only if every item in the flattened array is not equal to the empty string.
- If a value that is not a string or array is passed into the function, the value will be converted to a string before checking if the value is not an empty string.
- If an object is passed into the function, the function will return true only if the object has keys.
Syntax
=ISNOTEMPTY(expr)
Arguments
Argument | Type | Description |
---|---|---|
expr | String, Array or Object | The value to check for emptiness |
Examples
=ISNOTEMPTY("")
→ false
Checks if the string "" is empty.
=ISNOTEMPTY(123)
→ true
Checks if the number 123 is empty. 123 is converted to the string "123", which is not empty and the function returns true.
=ISNOTEMPTY(@"Property 1")
→ true
Checks if the shape data property "Property 1" is empty. Because "Property 1" is not empty (it has the value 1), the function returns true.
=ISNOTEMPTY(@"Property 4")
→ false
Checks if the shape data property "Property 4" is empty. Because "Property 4" is empty, the function returns false.
=ISNOTEMPTY(OBJECT("A", 2))
→ true
Checks if the object is not empty, and because the object has a key-value pair the function returns true.
Updated 9 months ago