Formula - notequal
Section titled “ Formula - notequal”The notEqual function, one of the Logical functions in the Formula plugin for Search Field Expressions, returns true when the content differs from the expression.

Animated walkthrough: on the JSON Order Received event of order ORD-10005 in the Order-to-Cash demo, notEqual('SEK', jsonPath('$.currency', body)) returns true, because the order is in USD. notEqual('USD', jsonPath('$.currency', body)) gives "Processed with warning: The Expression yields no result": equal values give no value, not false.
Syntax
Section titled “ Syntax”notEqual('expression', content [, content ...] [, matchAllValues])Parameters
Section titled “Parameters”| Parameter | Required | Description |
|---|---|---|
'expression' |
✅ Yes | The text to compare with, in single quotes, for example 'GMT'. |
content |
✅ Yes | The value or values to check: body, context, or another Formula function such as regex or jsonPath. When you give several content arguments, each of them must differ. |
matchAllValues |
❌ No | Unquoted true or false (default). Applies when one content argument returns several values: false means at least one value must differ, true means every value must differ. A quoted 'true' is not the flag; it is compared as text. |
Returns
Section titled “Returns”truewhen the content differs from the expression.- When it doesn't, there is no value, not
false: Test Expression shows Processed with warning: The Expression yields no result, and the Search Field gets no value. - When one content argument returns several values, one value that differs is enough, unless
matchAllValuesistrue. For example,notEqual('GMT', regex('GMT|UTC', body))onGMT UTCreturnstrue, becauseUTCdiffers.
Quoting, nesting, and how content is resolved are described in the Formula language rules.
Examples
Section titled “ Examples”Example 1: Check the message body
Section titled “Example 1: Check the message body”Message Body:
UTCFormula
Section titled “Formula”notEqual('GMT', body)Result
Section titled “Result”true
The message body UTC differs from GMT, so notEqual returns true.
Example 2: Check a message context value
Section titled “Example 2: Check a message context value”Message Context:
| Key | Value |
|---|---|
id |
UTC |
Formula
Section titled “Formula”notEqual('GMT', context('id'))Result
Section titled “Result”true
The context value of id is UTC, which differs from GMT, so notEqual returns true.
Example 3: Check values extracted by another function
Section titled “Example 3: Check values extracted by another function”Message Body:
GMT UTCFormula
Section titled “Formula”notEqual('CET', regex('GMT|UTC', body))Result
Section titled “Result”true
regex extracts GMT and UTC; neither is CET, so notEqual returns true.