- 5 minutes to read

Formula

Unlock the full potential of your integration data with the Nodinite Formula plugin. This page shows you how to extract, transform, and analyze values from any data structure—XML, JSON, CSV, or plain text—using a rich set of formula functions.

✅ Extract and transform values from any message or log event
✅ Use Excel-like formulas for advanced data manipulation
✅ Nest multiple functions for powerful, flexible expressions
✅ Accelerate troubleshooting and integration analytics


What is the Nodinite Formula Plugin?

The Nodinite Formula plugin empowers you to extract, transform, and analyze any value from any message or log event. You can apply one or more (even nested) functions, similar to formulas in Microsoft Excel, to create powerful and flexible search field expressions.

With support for multilevel nested functions, you can combine math, string, logical, base64, and extraction operations to solve even the most complex integration challenges.


Where do the extracted values come from?

You can extract values from the Body, Context, or Field of a message, as logged by Nodinite Logging Agents or from custom Log Events. The documentation uses the term Content to mean any of these sources, or the result of a previous formula operation.


Content Sources

The Formula plugin operates on data from any of the following:

  • Body – Flatfile, CSV, JSON, XML, or plain text payloads
  • Context – Key/value pairs such as headers or tracked properties
  • Field – Any pre-defined field (case-sensitive)
  • Result from a previous formula operation

Formula Function Types

The Formula plugin supports a wide range of function types, all of which can be nested for advanced scenarios:

  • Math (count, sum, min, max, avg, length)
  • String/Alter (concat, replace, substring, removebom)
  • Logical (equal, notEqual, isnull, startsWith, endsWith)
  • Extract (csv, jsonPath, jsonPathKey, regex, regexGroup, xPath, xPath2)
  • Convert (base64decode, base64encode, convert, toLowerCase, toUpperCase)

Example Function Syntax

You can use formulas in several ways, depending on your data and requirements:

  • function(content)
  • function(expression, content)
  • function(1st expression, 2nd expression, content)
  • function(content, ..., content)

Reference Tables

Sources

Function Description
body Returns the whole Body part as a string from the payload of the logged event
context('Key Name1') Returns the value of the specified name from the collection of Context Values of the logged event
context(regex('Key Name.*')) Returns the values of the Regular Expression matching names from the collection of Context Values of the logged event
contextKey(regex('Key Name.*')) Returns the keys of the Regular Expression matching names from the collection of Context Keys of the logged event
field Return the value for the named field

Extract

Function Description
csv(headerRowsToSkip, 'delimiter', columnIndex, 'commentSymbol', content) Extract data from any valid CSV file
jsonPath('expression', content) Used to extract value for the given path from a JSON valid structure
jsonPathKey('expression', content) Used to extract keys for the given path from a JSON valid structure
regex('expression', content) Use Regular Expression as it is implemented everywhere to extract values
regexGroup('expression', 'groups', content) Use Regular Expression and get the value from selected groups as it is implemented everywhere to extract values
xPath('expression', content) Retrieve values from XML body using a fast forward only reader XPath 1.0
xPath2('expression', content) Retrieve values from XML body using a XPath 2.0 (high memory usage)

Convert

Function Description
base64decode(content [, 'source encoding']) Decode the provided data into a human-readable format
base64encode(content [,'input encoding']) Encode text to base64
convert('source encoding','target encoding',content) Convert encoding from source encoding to target encoding New 5.4
toLowerCase(content) Convert any given text to 'lower case'
toUpperCase(content) Convert any given text to 'UPPER CASE'

Alter

Function Description
concat(content, ..., content) Can be used as a source, or concatenate any number of parameters
replace('oldValue', 'newValue',Content) Used to replace old text/letter with a new text.
substring(startIndex0, length, content) Extract specific text from any given statement/text
removebom(content) Remove the BOM if it exists New 5.4

Logical

Function Description
equal('expression', content) Check the equality of two given texts
endsWith('expression', content) Check if text ends with certain word/letter
isnull('expression', content) Check if value is null, if so return a default value, otherwise return the value New 6.1
notEqual('expression', content) Check the inequality of two given texts
startsWith('expression', content) Check if text starts with certain word/letter

Math Functions

Function Description
count(Content, [bool unique = false]) Return the count of the extracted values, based on the result of any previous operation
sum(Content, [bool unique = true]) Return the sum of the extracted values, based on the result of any previous operation
length(content, [bool unique = true]) Returns the numerical value(s) with the Length of the content
min(content, [bool unique = true]) Return the minimum value of numerical values, returns nothing if no numerical values was found
max(content, [bool unique = true]) Return the maximum value of numerical values, returns nothing if no numerical values was found
avg(content, [bool unique = true]) Return the average value of numerical values, returns nothing if no numerical values was found New 5.5

Handling Single Quotes

If your expression includes single quotes (apostrophe), you need to escape them using an extra single quote.

From To
' ''

Single Quotes
Here's an example of escaping single quotes.


Next Steps

Related Topics