Is empty
The Is empty comparison type checks whether the value defined as the Check value (value configuration) is considered 'empty'.
The following values are considered 'empty':
Change value |
||
in JSON notation |
Data type |
Meaning |
null |
n/a |
No value |
"" |
String |
empty string |
[] |
List, Set, Array |
empty 'list' |
Configuration
The value configuration for the Check value is not optional for the Is empty comparison type.
Examples
Check an address field for 'filled'
An association criterion (see Association criteria) should apply if the property 'Account number' (accNumber) within the address of a company is filled with an arbitrary string (except "").
Configuration:
The association criterion (see image on the right) uses two rules in an AND conjunction:
►NOTE◄ The Is empty comparison is 'passed' in the given context, if the company account does not refer to an address at all, or references an address without an indication for 'Account-No.' (accNumber) or if an empty string ("") has been assigned to this property (for example by an interface/workflow). |
|
►NOTE◄ Whether a single arbitrary character is accepted as 'Receipt no.' can be additionally via an input restriction or Validators for the Text field in forms.
Evaluate results of a search
After executing a Search (Event action) (event action) in an event handling (see Event handling) a case discrimination shall check if the 'result list' written into a variable is empty. If the search returned matches, a warning is issued.
Configuration:
The introductory Search (Event action) concerns accounts for Guest users, which are written as a list to the special_guests variable if successful. Further details about the search are omitted here. The If then else event action shown on the right implements case discrimination via an Entity property rule with the Is empty comparison type:
|
|
►NOTE◄ The Is empty comparison type could be negated by the not (Matcher) and the Show alert event action could be placed in the THEN branch below. Then the OTHER branch can be omitted completely and the configuration looks 'leaner'. However, many users find the variant chosen here without negation, in which the 'rule case' (here: Is empty) is handled in the THEN branch and the 'special case' in the OTHER branch, to be more transparent and intuitive, even if it takes up a bit more space. |
Success monitoring for a type conversion
If, when adding a specific Working state for a shipment (see Shipments), there is no specification for the 'Incoterms' (International Commerce Terms) field yet, a corresponding specification shall be requested from the user via the User prompt value resolver in the context of an event handling.
Although the User prompt value resolver only supports the input of free text, so that no dropdown with reference to the dynamic enumeration Incoterms can be offered. However, trade clauses are usually identified by three-digit letter combinations that can be easily entered manually.
After the entry, however, the dynamic enumeration Incoterms is used to check whether the entered letter code corresponds to the internal name of an entry created there. Otherwise, the transaction should be aborted with an error message.
Configuration:
In an event handling that reacts to the relevant working state change (see Working state (Events)), the configuration summarized on the right per Execute with event action is used:
►NOTE◄ The Set value event action (below) is executed only if there is no cancellation. Then the enumeration value derived from the User prompt (in Variable inco) is assigned to the corresponding field of the shipment. ►NOTE◄ We assume here that the field for 'International Commerce Terms' (incoterm) has already been checked for the 'empty' state in the Validating rule of the event handling, so that the user will only be prompted if there is no indication yet. |
|
Runtime example:
►NOTE◄ Entering 'FCA' (Free Carrier) would have worked if this option existed in the dynamic enumeration for Incoterms.
Negative criteria for a list
An association criterion (see Association criteria) should be considered passed for a user (see Users) exactly when the list in the 'roles' (roles) field does not contain a role whose name contains the string 'admin' (case-insensitive).
Configuration:
The association criteria links two rules in an AND-conjuction:
|
|
►NOTE◄ Even if the Resolve all as list option were set in the Rule list resolver, for example to store a list of all critical role (names) in a variable, the Rule list resolver will return 'No value' ($null) rather than an empty list ([]) if no role name like *admin* is found. The Is empty comparison type does not distinguish these two cases anyway. |
►NOTE◄ The special case in which the 'roles' (roles) field does not assign a single role is not dealt with here, as a user account cannot be saved without assigning a role.