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__cfield 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__cfield is empty. The result oftruewill be produces for following values ofCA10__availabilityZones__c:null,""," "," , ". SeeSettype for more details. -
Using
IS_EMPTYin 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__cfield is empty, setting the status toINCOMPLIANT.
See more details in:
- Unit Tests for
IS_EMPTYoperation onTexttype - Unit Tests for
IS_EMPTYoperation onBytestype - Unit Tests for
IS_EMPTYoperation onBooleantype - Unit Tests for
IS_EMPTYoperation onNumbertype - Unit Tests for
IS_EMPTYoperation onDateTimetype - Unit Tests for
IS_EMPTYoperation onSettype