a!isNullOrEmpty() returns false when the value being checked is a list containing only null or "" elements.
a!isNullOrEmpty()
false
null
""
For example, a!isNullOrEmpty({null}) returns false.
a!isNullOrEmpty({null})
This is expected behavior as a list with only null or "" elements is not an empty list. Additionally, a!isNullOrEmpty() does not iterate over lists to check for these elements in order to improve performance.
Please see the chart below for more examples of expected behavior regarding a!isNullOrEmpty() and lists:
a!isNullOrEmpty({{}, ""})
a!isNullOrEmpty(cast(197, ""))
a!isNullOrEmpty({tostring(null), tointeger(null)})
a!isNullOrEmpty({null,null})
If a value is a list that may contain only null or "" elements, please consider using length() or a!forEach() to check if it is empty.
This article applies to all versions of Appian.
Last Reviewed: September 2022