- 2 minutes to read

Formula - endswith

Easily check if text ends with a specific value using the Nodinite endswith Formula plugin. This page shows you how to validate message content, context values, or results from other formulas, ensuring your integrations are accurate and reliable.

✅ Instantly validate if text ends with a given string
✅ Use simple expressions for message content or context
✅ See clear, real-world examples with input, formula, and result


What does the endswith Formula do?

The endswith('value', Content) Formula function checks if the provided text ends with the specified value. Use this function to validate data, filter results, or trigger actions based on text endings.


Example 1: Check if Message Body Ends With Value

Input from [Bodybody]

Nodinite

Formula Expression

endswith('inite', body)

Result

true

Example 2: Check if Context Value Ends With Value

Suppose you have a message context value with the key id containing GMT.

Input

GMT

Formula Expression

endswith('T', context('id'))

Result

true

Example 3: Check if Result from Another Formula Ends With Value

You can use the result of another formula function as input. For example, extracting values with regex and checking if they end with a specific character:

Input

GMT UTC

Formula Expression

endswith('C', regex('GMT|UTC', body))

Result

true

Features

  • Check if text ends with a specific value for data validation
  • Works with message body, Context, or results from other Formula functions
  • Ensures data integrity across integrated systems

Important

The endswith plugin loads the entire message into RAM. Only use this function on small messages to avoid performance issues.


How to use the endswith Formula

  1. Select Formula as the expression type plugin.
  2. Enter your endswith expression in the 'Expression' text area.
  3. Provide a string-based Content parameter (e.g., message body, context value, or another formula result).

Syntax

  • Check from message body:
    endswith('value', body)
  • Check from message context:
    endswith('value', context('MessageContextKey'))
  • Check result from another formula:
    endswith('value', SomeOtherNestedFormulaFunction(Content))

Next Step

How to Add or manage Search Fields
How to Add or manage Log Views


Ends with Message Body
Example: Checking if message body ends with a value

Ends with Message Context
Example: Checking if context value ends with a value

Ends with Formula Funtion
Example: Using another formula as input for endswith