IS_EMPTY
IS_EMPTY:
arg: { arg } # required
Description
The IS_EMPTY
operation checks if the provided argument arg
is considered empty. What constitutes "empty" depends on the provided type (see Type System). This operation returns a Boolean
value: true
if the argument is empty, and false
otherwise.
Parameters
arg
(Operation<Any>, required):- Specifies the value to be checked for emptiness.
- This can be any operation that resolves to a supported Compliance Engine type (Text, Bytes, Number, DateTime, Collection, etc.).
Return Type
Examples
-
Checking if a text field is empty:
IS_EMPTY:
arg:
FIELD:
path: CA10__notes__cThis example checks if the value of the
CA10__notes__c
field is empty (null, empty text, or text containing only spaces). -
Checking if a collection is empty:
IS_EMPTY:
arg:
SET_FROM:
arg:
FIELD:
path: CA10__availabilityZones__c
separator: ","This example checks if the collection created from the comma-separated string in
CA10__availabilityZones__c
field is empty. The result oftrue
will be produces for following values ofCA10__availabilityZones__c
:null
,""
," "
," , "
. SeeSet
type for more details. -
Using
IS_EMPTY
in a condition:- status: INCOMPLIANT
currentStateMessage: "Description is missing"
remediationMessage: "Please provide a description for this resource."
check:
IS_EMPTY:
arg:
FIELD:
path: CA10__description__cThis condition will be met if the
CA10__description__c
field is empty, setting the status toINCOMPLIANT
.
See more details in:
- Unit Tests for
IS_EMPTY
operation onText
type - Unit Tests for
IS_EMPTY
operation onBytes
type - Unit Tests for
IS_EMPTY
operation onBoolean
type - Unit Tests for
IS_EMPTY
operation onNumber
type - Unit Tests for
IS_EMPTY
operation onDateTime
type - Unit Tests for
IS_EMPTY
operation onSet
type