- 5 minutes to read

Formula Search Field Expression Plugin

Unlock the full potential of your integration data with the Nodinite Formula Search Field Expression 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 built-in properties of a Log Event ✅ Use Excel-like formulas for advanced data manipulation ✅ Nest multiple functions for powerful, flexible expressions ✅ Accelerate troubleshooting and integration analytics using Log Views


What is the Formula plugin?

The Formula plugin empowers you to extract, transform, and analyze any value from a 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, conversion, and extraction operations to solve even the most complex integration challenges.

Key Capabilities:

  • Combine multiple extraction methods (XPath, RegEx, JSONPath, CSV) in a single expression
  • Apply transformations (base64 decode/encode, case conversion, string manipulation)
  • Perform calculations (sum, average, min, max, count)
  • Implement conditional logic (equality checks, null handling, pattern matching)
  • Enrich data with external lookups (SQL database queries)

How it works

The Formula plugin extracts and transforms values from Log Events using a function-based syntax:

graph LR A[Log Event] --> B{Content Source} B -->|Body| C[Extract/Transform] B -->|Context| C B -->|Field| C C --> D[Apply Formula Function] D --> E[Search Field Result] style A fill:#e1f5ff style B fill:#fff4e1 style C fill:#ffe1f5 style D fill:#e1ffe1 style E fill:#f0e1ff

Content Sources:

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

  • Body - Flat file, 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 - Chain functions together

The documentation uses the term Content to mean any of these sources, or the result of 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
  • Alter/String - concat, replace, substring, removebom
  • Logical - equal, notEqual, isnull, startsWith, endsWith
  • Extract - csv, jsonPath, jsonPathKey, regex, regexGroup, sqllookup, xPath, xPath2
  • Convert - base64decode, base64encode, convert, toLowerCase, toUpperCase

Function syntax

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

  • function(content) - Single parameter
  • function(expression, content) - Expression with content
  • function(1st expression, 2nd expression, content) - Multiple expressions
  • function(content, ..., content) - Multiple content parameters

Function reference

Sources

Extract data from different parts of a Log Event:

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('fieldName') Returns the value for the named field (case-sensitive)

Extract

Extract values from structured and unstructured data:

Function Description
csv(headerRowsToSkip, 'delimiter', columnIndex, 'commentSymbol', content) Extract data from CSV files with configurable delimiters and column selection
jsonPath('expression', content) Extract values from JSON using JSONPath expressions
jsonPathKey('expression', content) Extract keys (property names) from JSON structures
regex('expression', content) Use Regular Expressions to extract matching values
regexGroup('expression', 'groups', content) Extract specific capturing groups from Regular Expression matches
sqllookup('connectionString', 'query', content) Look up values from SQL databases using parameterized queries
xPath('expression', content) Extract values from XML using XPath 1.0 (fast forward-only reader)
xPath2('expression', content) Extract values from XML using XPath 2.0 (supports complex queries, higher memory usage)

Convert

Transform and encode data:

Function Description
base64decode(content [, 'source encoding']) Decode base64-encoded data into human-readable format
base64encode(content [, 'input encoding']) Encode text to base64 format
convert('source encoding', 'target encoding', content) Convert text encoding from source to target encoding
toLowerCase(content) Convert text to lowercase
toUpperCase(content) Convert text to uppercase

Alter

Manipulate and transform strings:

Function Description
concat(content, ..., content) Concatenate any number of content parameters into a single string
replace('oldValue', 'newValue', content) Replace all occurrences of old text with new text
substring(startIndex, length, content) Extract a substring starting at the specified index with the given length
removebom(content) Remove Byte Order Mark (BOM) if present

Logical

Conditional logic and comparisons:

Function Description
equal('expression', content) Check if content equals the expression (returns content if true, nothing if false)
endsWith('expression', content) Check if content ends with the specified expression
isnull('defaultValue', content) Return default value if content is null or empty, otherwise return content
notEqual('expression', content) Check if content does not equal the expression
startsWith('expression', content) Check if content starts with the specified expression

Math

Perform calculations on extracted values:

Function Description
avg(content, [bool unique = true]) Calculate the average of numerical values
count(content, [bool unique = false]) Count the number of extracted values (optionally unique only)
length(content, [bool unique = true]) Return the length (character count) of content
max(content, [bool unique = true]) Return the maximum numerical value
min(content, [bool unique = true]) Return the minimum numerical value
sum(content, [bool unique = true]) Calculate the sum of numerical values

Important considerations

Escaping Single Quotes

If your expression includes single quotes (apostrophes), you must escape them using an additional single quote:

Character Escaped Form
' ''

Example:

jsonPath('$.items[?(@.name==''John''s Order'')]', body())

Single Quotes Example of escaping single quotes in formula expressions.

Performance Tips

  • XPath: Use xPath() (XPath 1.0) for better performance with large XML files
  • XPath2: Only use xPath2() when advanced XPath 2.0 features are required (higher memory usage)
  • Nesting: Complex nested formulas may impact processing time—test with real data
  • SQL Lookups: Cache frequently accessed database values when possible

Next steps