Formula

You hide it, we find it! Learn how to extract and modify returned values from just about any data structure

Formula plugin helps you to extract any value from any given message by applying solely one of the listed functions or by using a combination of them(Nested Functions) on your content. The formula plugin works like formulas for example in Excel (with functions as listed in reference table below)

Formula plugin supports powerful concept, (Multilevel Nested Functions) which is the key feature of this plugin.However,it is too early to consider it right away ,So we will demonstrate this as we move further with our examples (Test Expressions).

Expression Types are used in Search Fields.

How to Configure Search Field Expression.

How to Add or manage Search Field.


Where does the extracted values come from?

The values extracted comes from the the Body and/or named Context property that was logged by the Nodinite Logging Agents or from custom logged Log Events.

The documentation for the Formula plugin uses the notion of Content meaning either the actual payload (Body) or a named Context property.

Content

The operations execute on data that comes any of the following

  • body

    • Flatfile and CSV structures
    • JSON
    • XML
  • context

    • Key/Value
  • Result from previous Formula operation

The Formula plugin have different types of functions for example math, string, logical, base64 and can all be nested like:

  • Function(Content)
  • Function(Expression,Content)
  • Function(1st Expression, 2nd Expression,Content)
  • Function(1st Expression,2nd Exp..,3rd...,Content)

Base64:

Function Description
base64decode(Content) Decode the provided data into a human readable format
base64encode(Content) Encode text to base64

String:

Function Description
replace(1st Expression,2nd Expression,Content) Used to replace old text/letter with a new text.
substring(1st Expression,2nd Expression,Content) Extract specific text from any given statement/text
tolowercase(Content) Convert any given text to LowerCase
touppercase(Content) Convert any given text to UpperCase

Extract:

Function Description
csv(1st Expression,2nd Expression,...,Content) Extract data from any valid CSV file
jsonpath(Expression,Content) Used to extract value from JSON body structure
regex(Expression,Content) Use Regular Expression as it is implemented everywhere to extract values
xpath(Expression,Content) Retrieve values from XML body

Logical:

Function Description
equal(Expression,Content) Check the equality of two given texts
endswith(Expression,Content) Check if text ends with certain word/letter
notequal(Expression,Content) Check the inequality of two given texts
startswith(Expression,Content) Check if text starts with certain word/letter(s)

Math Functions :

Function Description
count(Content) Return the count of the extracted values from the returned result of previous operation

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?