Possible and Impossible Value Rules ¶
These rules verify that the ticket property's value is or is not in the list of possible values. Values must be separated by a comma (,
).
Possible Value ¶
Verifies that the ticket's property is in the list of possible values.
Syntax
1 2 | check <property String> is one of <values List<Any>>; check <property String> is one of <values List<Any>> if present; |
-
property - The property being checked.
-
values - The list of possible values that the property may match. If using a context variable, which will be resolved to a list, a preceding
$
and enclosing square brackets, e.g.,$[ctx.data.list]
is required.
Example
1 2 3 | check "CALLED_NUMBER_TON" is one of "01", "02", "03"; check "CALLED_NUMBER_TON" is one of "01", "02", "03" if present; check "CALLED_NUMBER_TON" is one of "$[ctx.data.list]"; |
Additional Examples
Property Value | Rule Parameter | Check Result |
---|---|---|
"abc" |
"abc" , "def" , "ghi" |
OK |
"abc" |
"ab" , "de" |
FAIL |
123 |
123 , 456 |
OK |
123 |
12 , 45 , 67 |
FAIL |
Impossible Value ¶
Verifies that the ticket property's value is not in the list of possible values.
Syntax
1 2 | check <property String> is none of <values Any>...; check <property String> is none of <values Any>... if present; |
Parameters
-
property - The property being checked.
-
values - The list of possible values that the property must not match. If using a context variable, which will be resolved to a list, a preceding
$
and enclosing square brackets, e.g.,$[ctx.data.list]
is required.
Example
1 2 3 | check "CALLED_NUMBER_TON" is none of "01", "02", "03"; check "CALLED_NUMBER_TON" is none of "01", "02", "03" if present; check "CALLED_NUMBER_TON" is none of "$[ctx.data.list]"; |
Additional Examples
Property Value | Rule Parameter | Check Result |
---|---|---|
"abc" | "abc", "def" | FAIL |
"abc" | "ab", "de" | OK |
123 | 123, 456 | FAIL |
123 | 12, 45, 67 | OK |