Free cookie consent management tool by TermsFeed a!isNotNullOrEmpty() Function
a!isNotNullOrEmpty() Function

Function

Returns false if the value is null, an empty string, or an empty list. Otherwise returns true.

See also:

Parameters

Keyword Type Description

value

Any Type

Value to be checked.

Returns

Boolean

Usage considerations

Replace if() and isnull() expressions with a!isNotNullOrEmpty

This function is similar to the behavior of using if() and isnull() in combination to check for the absence of a value or an empty string or list.

For example, you could create an expression using if() and isnull():

1
2
3
4
5
6
7
8
9
not( 
    or( 
        or(tostring(ri!input) = "", isnull(ri!input)), 
        if(isnull(ri!input), 
            true, 
            length(a!flatten(ri!input)) = 0 
            ) 
        ) 
    )

Or you could use a!isNotNullOrEmpty(), which requires fewer lines of code:

1
a!isNotNullOrEmpty(ri!input)

Examples

1
a!isNotNullOrEmpty(togroup(null))

Returns false

1
a!isNotNullOrEmpty("")

Returns false

1
a!isNotNullOrEmpty({1,2,3,4})

Returns true

1
a!isNotNullOrEmpty(cast(recordType!Address, null)

Returns false

1
a!isNotNullOrEmpty(recordType!Address)

Returns true

Open in Github Built: Fri, Nov 10, 2023 (03:42:48 PM)

a!isNotNullOrEmpty() Function

FEEDBACK