- 3 minutes to read

Formula - notequal

Easily check if values are not equal using the Nodinite notequal Formula plugin. This page shows how to compare message Content, Context, or the output of other formulas, ensuring your integrations are accurate and reliable.

🎯 Designed for business users and integrators β€” no developer required; you can even use AI to craft expressions.

  • βœ… Instantly validate if values are different for data consistency from any Payload or Context in any Log Event
  • βœ… Boolean result (true/false) for conditional logic and filtering
  • βœ… Transform and surface meaningful data in Nodinite Log Views, search filters, and self-service diagnostics
  • βœ… Combine with other Formula functions for powerful, layered expressions

What does the notequal Formula do?

The notequal('Expression', Content) Formula function checks whether two text values are not equal. It returns true if the values are different. Use this function to validate data, filter results, or trigger actions based on value differences.


How it works: Input ➜ notequal ➜ Result

graph LR A["Input: Values to compare"] --> B["notequal('value', Content)"] B --> C["Result: true or false"]

Flow: Values are compared against a specified expression, returning true if they differ.


Examples

Below are practical examples showing how to check if values are not equal.

Example 1: Check if Message Body is Not Equal to Value

Input

UTC

Formula Expression

notequal('GMT', body())

Result

true

notequal_simpleParameter

Example: Checking if message body is not equal to a value


Example 2: Check if Context Value is Not Equal to Value

Suppose you have a message context value with the key id containing UTC.

Input

UTC

Formula Expression

notequal('GMT', context('id'))

Result

true

notequal_MessageContext

Example: Checking if context value is not equal to a value


Example 3: Check if Result from Another Formula is Not Equal to Value

You can use the result of another formula function as input. For example, extracting values with regex and checking if they are not equal to a specific value.

Input

GMT UTC

Formula Expression

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

Result

true

notequal_nested_body

Example: Using another formula as input for notequal


Features

The notequal Formula function is highly flexible and can be nested with other formula functions. For instance, combine it with regex, jsonPath, or substring to validate extracted or transformed data.

  • Check if two values are not equal for data validation
  • Returns boolean true or false for conditional logic
  • Works with message body, Context, or results from other Formula functions
  • Ensures data integrity across integrated systems

Important

The notequal plugin loads the entire message into RAM. Only use this function on small messages to avoid performance issues.


How to use

The notequal formula validates if values do not match a specified expression. It's ideal for inequality checks, data filtering, or conditional logic.

Syntax

notequal('Expression', Content)

Parameters:

  • Expression (string): The value to compare against, e.g., 'GMT', 'Error', '404'
  • Content (string): The value to check, typically from body() or context()

Common patterns:

  • notequal('GMT', body()) – Check if body does not equal "GMT"
  • notequal('Error', context('status')) – Validate status is not "Error"
  • notequal('CET', regex('GMT|UTC', body())) – Check if extracted value is not "CET"

Use with different sources:

  • Check message body: notequal('value', body())
  • Check message context: notequal('value', context('MessageContextKey'))
  • Check formula result: notequal('value', regex('pattern', body()))

Next step