Skip to content
Documentation
Updated 2 minutes to read
Markdown

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.

Check that an order is not in a given currency with notEqual on an Order-to-Cash event, animated walkthrough (7.12)
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.

notEqual('expression', content [, content ...] [, matchAllValues])
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.
  • true when 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 matchAllValues is true. For example, notEqual('GMT', regex('GMT|UTC', body)) on GMT UTC returns true, because UTC differs.

Quoting, nesting, and how content is resolved are described in the Formula language rules.

Message Body:

UTC
notEqual('GMT', body)
true

Test Expression tab: notEqual('GMT', body) on the message body UTC returns true (7.12)
The message body UTC differs from GMT, so notEqual returns true.

Message Context:

Key Value
id UTC
notEqual('GMT', context('id'))
true

Test Expression tab: notEqual('GMT', context('id')) with the context key id set to UTC returns true (7.12)
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 UTC
notEqual('CET', regex('GMT|UTC', body))
true

Test Expression tab: notEqual('CET', regex('GMT|UTC', body)) on the message body GMT UTC returns true (7.12)
regex extracts GMT and UTC; neither is CET, so notEqual returns true.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...