Formula - Max
Quickly find the maximum value in your data using the Max Formula in Nodinite. This page provides clear, real-world examples with a new, easy-to-read layout that separates input, formula, and result.
✅ Instantly get the maximum value from message body, Context, or nested formulas ✅ Use with XML, JSON, CSV, or plain text data ✅ Enhance your integration analytics with unique, reliable results
🎯 Design Note: The Max()
function returns the highest value extracted from your data.
What does the Max formula do?
The Max()
formula returns the highest value extracted from your data. Use it to analyze message payloads, context values, or results from other formulas in your log views and search fields.
Examples
Below are practical examples showing exactly what input is used, the formula expression, and the resulting output.
Example 1: XML Message Body
Input
<ns0:Orders xmlns:ns0="SupplyChain.Schemas/1.0">
<Order>
<Id>1337</Id>
<Amount>666</Amount>
<City>Grums</City>
<Partner>QWNtZQ==</Partner>
</Order>
<Order>
<Id>1338</Id>
<Amount>42</Amount>
<City>Karlstad</City>
<Partner>QWNtZQ==</Partner>
</Order>
</ns0:Orders>
Formula Expression
Max(xpath('Orders/Order/Amount', body))
Result
666
Example 2: JSON Message Body
Input
{"a":[{"b":"1337"},{"b":"8"},{"b":"42"}]}
Formula Expression
Max(jsonpath('a[*].b', body))
Result
1337
The result is 1337 because it is the largest value in the JSON array.
Example 3: CSV in Message Context
Input
"face","suit","value"
"king","spades","13"
"queen","spades2","12"
#"jack","spades3","666"
"ten","spades4","10"
Formula Expression
Max(csv(1,',',2,'#',context('Ids')))
Result
13
The result is 13 because it is the highest value in the CSV context.
Features
- Get the maximum value from any Content
- Works with XML, JSON, CSV, plain text, or any valid formula plugin
- Returns the maximum of unique values only
- Ideal for integration analytics and data validation in Nodinite
Important
This plugin loads the entire message into RAM. For best performance, use it only on small messages.
How to use the Max formula
Syntax
- From Message Body:
Max(body, [bool unique = true])
- From Message Context:
Max(context('MessageContextKey'), [bool unique = true])
- From Nested Formula:
Max(SomeOtherFormula(Content), [bool unique = true])
Next step
Related Topics
- 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?
- Other Math formulas: average, count, length, min, sum