Document toolboxDocument toolbox

Text Formatter

Description

This unit is a Processor unit type.

The Text Formatter unit formats text included in the input events using the template provided. The template can reference input event fields at unit level, or global values at system level. 

An event comes in through the in port. Then, the template format is applied. The input event is enriched with an extra field containing the formatted text and sent to the out port.

Undefined references to system variables will be considered as errors.

Undefined references to input event fields can follow various courses of action, configurable in the Undefined action field.

Configuration

After dragging this unit into the Flow canvas, double-click it to access its configuration options. The following table describes the configuration options of this unit:

TabFieldDescription

General

NameEnter a name for the unit. It must start with a letter, and cannot contain spaces. Only letters, numbers, and underscores are allowed.
Formatted field nameThe name of the output event field containing the formatted result.
Format

The template for the message to be generated. You can refer to input event fields at unit level, or global values at system level, using the following format:

text %%{variable} text

Undefined action

Select the action to perform when a field referenced in the template doesn't exist in the input event.

Empty: leave empty.

Null: insert "null".

Mark: insert a mark in the form of {fieldName}.

Fail: unable to perform any action.

Input ports

PortDescription
inInput events are expected to contain fields included in the template format. Fields that do not match the correct format will use the standard format for undefined values.

Output ports


PortDescription
outOutputs events enriched with an extra field (specified in the formatted field name setting) containing the formatted text.