Formula - isnull
Section titled “ Formula - isnull”New 6.1
The isnull function, one of the Logical functions in the Formula plugin for Search Field Expressions, returns a default value when the content is null or empty, and the content itself otherwise.

Animated walkthrough: the JSON Order Received event of order ORD-10005 in the Order-to-Cash demo has no phone number, so jsonPath alone gives "Processed with warning: The Expression yields no result". Wrapped in isnull with 'no phone given', the formula returns that text. On the e-mail address, which is there, the same formula returns the address itself.
Syntax
Section titled “ Syntax”isnull(content, 'default')Parameters
Section titled “Parameters”| Parameter | Required | Description |
|---|---|---|
content |
✅ Yes | The value to check, typically the result of another Formula function such as jsonPath or xPath, or body or context. |
'default' |
✅ Yes | The text to return when content is null or empty, in single quotes. |
Returns
Section titled “Returns”- The
'default'text whencontentis null or empty, or gives no value at all, such as a jsonPath to a property the message doesn't have. - Otherwise the value of
content, unchanged.
Quoting, nesting, and how content is resolved are described in the Formula language rules.
Examples
Section titled “ Examples”Example 1: Return the default when the value is null
Section titled “Example 1: Return the default when the value is null”Message Body:
{ "name": null }Formula
Section titled “Formula”isnull(jsonPath('name', body), 'default')Result
Section titled “Result”defaultThe name property is null, so isnull returns the default text.

jsonPath finds no value for the null property, so the fallback text is used.
Example 2: Return the value when it is present
Section titled “Example 2: Return the value when it is present”Message Body:
{ "name": "John Doe" }Formula
Section titled “Formula”isnull(jsonPath('name', body), 'default')Result
Section titled “Result”John DoeThe name property has a value, so isnull returns it unchanged.

Same formula as Example 1; with a value present, the default text is not used.