Formula - Min
Easily find the minimum value in your data using the Min 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 minimum 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
What is the Min formula?
The Min()
formula returns the lowest 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.
Syntax
- From Message Body:
Min(body, [bool unique = true])
- From Message Context:
Min(context('MessageContextKey'), [bool unique = true])
- From Nested Formula:
Min(SomeOtherFormula(Content), [bool unique = true])
Examples: Input, Formula, and Result
Below are practical examples showing exactly what input is used, the formula expression, and the resulting output.
Example 1: XML Message Body
Input from Body
<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
Min(xpath('Orders/Order/Amount', body))
Result
42
Example 2: JSON Message Body
Input
{"a":[{"b":"1337"},{"b":"8"},{"b":"42"}]}
Formula
Min(jsonpath('a[*].b', body))
Result
8
The result is 8 because it is the smallest 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
Min(csv(1,',',2,'#',context('Ids')))
Result
10
The result is 10 because it is the lowest value in the CSV context.
Features
- Get the minimum value from any Content
- Works with XML, JSON, CSV, plain text, or any valid formula plugin
- Returns the minimum of unique values only
- Ideal for integration analytics and data validation in Nodinite
Note
This plugin loads the entire message into RAM. For best performance, use it only on small messages.
Next Steps
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?