Text and Binary Handlers

Text and Binary Handlers in Studio are predefined functions used to modify, split, format, and transform text strings and file data during the mapping process. These handlers enable you to manipulate text without writing custom code.

Using Text Handlers in Mapping

Text and binary handlers can be selected directly inside flow mapping operations. Click any destination field in the mapping panel, open the handler picker, and choose the text function you need — the handler runs inline as part of the mapping step without requiring a separate logic processor.

Accessing Text and Binary Handlers

1

Click on any destination field in the mapping panel

2

A pop-up window opens titled "Text and Binary Handlers"

3

You'll see the Handlers section with available text functions

Text Handlers

Upper()

upper(text)

Converts all alphabetical characters in a text string to uppercase.

Example

upper("Hello") = "HELLO"

Lower()

lower(text)

Converts all alphabetical characters in a text string to lowercase.

Example

lower("Hello") = "hello"

Capitalize()

capitalize(text)

Converts the first character of a text string to uppercase.

Example

capitalize("make") = "Make"

Startcase()

startcase(text)

Capitalizes the first letter of every word and lowercases all other letters.

Example

startcase("hello WORLD") = "Hello World"

Length()

length(text)

Returns the length of a text string.

Example

length("hello") = 5

ToString()

toString(value)

Converts any value (number, boolean, object) to a string. Use when the destination field expects a text value.

Example

toString(12345) = "12345"

Contains()

contains(text; value)

Verifies whether a text contains the specified value. Returns true or false.

Example

contains("Hello World"; "Hello") = true
contains("Hello World"; "Bye") = false

Split()

split(text; separator)

Splits a string into an array of substrings at each point where the separator occurs. The separator is not included in the resulting items.

  • text — The string to split
  • separator — The character or string to split on

Example

split("hello world"; " ") = ["hello", "world"]

Substring()

substring(text; start; end)

Returns a portion of the text string between the start and end positions. Positions are zero-based.

  • text — The source string
  • start — Starting index (inclusive, zero-based)
  • end — Ending index (exclusive)

Example

substring("Hello"; 0; 3) = "Hel"

Replace()

replace(text; search string; replacement string)

Replaces the search string with the new replacement string.

  • text — The source string
  • search string — The substring to find
  • replacement string — The value to replace it with

Example

replace("Hello World"; "Hello"; "Hi") = "Hi World"

Trim()

trim(text)

Removes space characters at the start and end of the text. Does not affect spaces between words.

Example

trim(" Reachware Studio ") = "Reachware Studio"

URL Handlers

EncodeURL()

encodeURL(text)

Encodes special characters in a text to a valid URL address.

Example

encodeURL("Hello World!") = "Hello%20World%21"

DecodeURL()

decodeURL(text)

Decodes special characters in a URL back to readable text.

Example

decodeURL("Hello%20World%21") = "Hello World!"

File Handler

FileData()

FileData(binaryData, fileName)

Combines raw file data with a filename to create a valid file structure that can be sent to the API destination. Both binary content and the filename are required.

  • binaryContent — The raw binary data of the file (usually represented as a sequence of numbers).
  • fileName — The name of the file including its extension (e.g., image.png, document.pdf).

Example

FileData(137 80 78 71 13 26 10 0; logo.png)

Binary Handlers

encodeBase64()

encodeBase64(value)

Converts a regular string or binary file data into a Base64-encoded string. Commonly used to safely transmit data (files, images, text) in systems that only accept text-based formats like JSON or XML.

Example — Text

encodeBase64("Hello, Reachware!") = "SGVsbG8sIFJlYWNod2FyZSE="

Example — Binary (image bytes)

// Binary stream of logo.png
encodeBase64(137 80 78 71 13 26 10 0 0 0 13 73 72 68 82) = "iVBORw0KGgoAAAANSUhEUgAAA..."

decodeBase64()

decodeBase64(value)

Converts a Base64-encoded string back into its original form — either as plain text or binary data.

Example — Text

decodeBase64("SGVsbG8sIFJlYWNod2FyZSE=") = "Hello, Reachware!"

Example — File

decodeBase64("iVBORw0KGgoAAAANSUhEUgAA...") = 137 80 78 71 13 26 10 0 0 0 13 73 72 68 82 // binary stream

Related Topics