Operator Scope of Action:
Operator First Added:
Operator Last Altered:
!= (i.e. inequality test)
The operator to test inequality (i.e. 'is not the same as') is '!=', an exclamation mark followed by an equals sign.
This test cannot be meaningfully applied to Set or List type attribute data, as the entire attribute value is matched, rather than individual values as might otherwise be assumed. For these data types use the .contains() or .icontains() operators instead, noting the scope for ambiguous matching due to stemming of words ("car" with match "car", "cars" and "carrot").
Because equality comparisons of Date-type data match at day scope, rather than full date/time values (for legacy reasons), use interval() to compare Date-type inequality.
Equality testing can be negated, i.e. tested for a non-match, or combined with greater/less than for a range of tests as further explored in Basic Comparison Codes.
For a case-insensitive lexical equality test, use a lowercase on-the-fly transform:
"Absquatulate".lowercase != "Absquatulate"
If we set $MyString to "Absquatulate", then:
$MyString.lowercase != "Absquatulate"
If $MyOtherString(Some note) has the value "Absquatulate", then:
$MyString.lowercase != $MyOtherString(Some note)
Note the stored left-side value is not altered, but its transformed version is used in the test giving a case-insensitive comparison. This method only works for upper/lower case comparisons; accented characters are lexically different characters regardless of case.