- 2 minutes to read

Formula - replace

The replace Formula in Nodinite lets you substitute any string or character in message body, context, or even nested formulas. This page provides a clear, step-by-step guide with practical examples, so you can quickly master text replacement for your integration needs.

✅ Replace any value in message body or context
✅ Use with nested formulas for advanced scenarios
✅ Enhance data quality and search field results in Nodinite


What is the replace formula?

The replace function substitutes all occurrences of a specified string or character with a new value. You can use it on message body, context, or the result of another formula.


How does it work?

Each example below is structured in three clear steps:

  1. Input – The data or context you start with
  2. Formula – The replace expression you use
  3. Result – The output you get

Examples

Example 1: Replace a word in the message body

Input:

nodinite

Formula:

replace('nodinite','most innovative product',body)

Result:

most innovative product

Example 1
Replaces 'nodinite' with 'most innovative product' in the message body


Example 2: Replace a word in a context value

Input:

nodinite

Formula:

replace('nodinite','most innovative company',context('id'))

Result:

most innovative company

Example 2
Replaces 'nodinite' with 'most innovative company' in the context value


Example 3: Replace a word in a nested formula result

Input:

[  { "name": "Amazing Function" }, { "name": "Amazing Implementation" } ]

Formula:

replace('Amazing','Cool',jsonpath('$..name',body))

Result:

Cool Function, Cool Implementation

Example 3
Replaces 'Amazing' with 'Cool' in all names returned by the jsonpath function


Usage Tips

  • Use with any Content that returns text
  • Works with jsonpath, xpath, or other formula functions
  • Only use on small messages—this function loads the entire message into RAM

Next Step

Add or manage Search Fields
Add or manage Log Views