Formula - notequal

notequal('Expression',Content) Formula function used to check if two strings (text) are not equal.

Quick example

Let's get you started with the following simple demonstration example valid for this Formula plugin. For other and more advanced examples please scroll down on this page to the Examples section.

Input Expression Result

  UTC


notequal('GMT',body)

true
Text Data notequal expression Unique values

Features

  • Check if two word/character are the not equal.
  • Return Unique true when the compared text/string are different.
  • Can be applied on any valid Content that return text/string; Like jsonpath, xpath functions, review Formula user guide for complete list of functions.

This plugin loads the entire message into RAM, so make sure to apply this function on smaller messages only

How to use

In order to use the notequal function the Content parameter should contain text/string (otherwise it will fail and you will end up with garbage result). But first and foremost we have to configure the Formula plugin:

  • Select Formula as expression type plugin.
  • Write down the expression to use in the 'Expression' text area.
  • Input a proper Content as parameter to the function.

Syntax

Use the notequal function with any of the following parameters:

  • From Message Body: notequal('Expression', body)

  • From Message Context: notequal('Expression',context('MessageContextKey'))

  • Result from previous Formula operation notequal('Expression',SomeOtherNestedFormulaFunction(Content))


Examples

Below you will find different common examples for how to use the notequal function.

Body as Content

The message body is normal text "UTC", by using the provided expression the result will be true.

e.g. notEqual('GMT',body)
notequal_simpleParameter

Message Body


 UTC

Expression


notEqual('GMT',body)


Context as Content

"UTC" is the Message context value and the key is "id", by using the provided expression the result will be true. e.g. notEqual('GMT', context('id'))

notequal_MessageContext

Message Context Value


UTC

Expression


notEqual('GMT', context('id'))


Formula Function as Content

Regex function has been used as a content parameter for notequal function, by using the provided expression the result will be true.

e.g. notEqual('CET', regex('GMT|UTC', body))

notequal_nested_body

Message Body


GMT UTC

Expression


notEqual('CET', regex('GMT|UTC', body))


Next Step

How to Add or manage Search Fields
How to Add or manage Log Views

Expression Type Plugins are used in Search Fields
What are Search Fields?
What are Search Field Expressions?
What are Message Types?
What are Log Views?