Formula - isnull
New 6.1
Easily check for null or empty values and provide defaults using the Nodinite isnull
Formula plugin. This page shows you how to validate message content, context values, or results from other formulas, ensuring your integrations are robust and reliable.
✅ Instantly detect null or empty values and set defaults
✅ Use simple expressions for message content or context
✅ See clear, real-world examples with input, formula, and result
What does the isnull Formula do?
The isnull('Expression', Content)
Formula function checks if a value is null or contains only whitespace. If so, it returns a default value; otherwise, it returns the actual value. Use this function to ensure your data always has a meaningful value.
Example 1: Provide Default When Value is Missing
Input from Body
{ "name": "John Doe" }
Formula Expression
isnull(jsonpath('missingname', body), 'Jane Doe')
Result
Jane Doe
Example 2: Return Actual Value When Present
Input
{ "name": "John Doe" }
Formula Expression
isnull(jsonpath('name', body), 'Jane Doe')
Result
John Doe
Features
- Check if the result from previous formula expressions yields empty data
- Return either the value or a default value
- Works with message body, Context, or results from other Formula functions
- Ensures data integrity across integrated systems
Important
The isnull plugin loads the entire message into RAM. Only use this function on small messages to avoid performance issues.
How to use the isnull Formula
- Select Formula as the expression type plugin.
- Enter your isnull expression in the 'Expression' text area.
- Provide a string-based Content parameter (e.g., message body, context value, or another formula result).
Syntax
- Check for null or empty value:
isnull(expression, 'Default Value')
Next Step
How to Add or manage Search Fields
How to Add or manage Log Views
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?