- 2 minutes to read

Formula - toUpperCase

The toUpperCase Formula function returns the content with every letter in uppercase.

Syntax

toUpperCase(content)

Parameters

Parameter Required Description
content Yes The text to convert: body, context, or the result of another function, such as regex.

Returns

The content in uppercase. When the content holds several values, each value is converted and returned as its own Search Field value. When the content has no value, nothing is returned.

Examples

Example 1: Uppercase the message body

Input

gmt

Formula

toUpperCase(body)

Result

GMT

Test Expression tab: toUpperCase(body) returns GMT for the message body gmt
The whole message body is returned in uppercase.

Example 2: Uppercase a context property

Input

Key Value
id gmt

Formula

toUpperCase(context('id'))

Result

GMT

Test Expression tab: toUpperCase(context('id')) returns GMT for the context value gmt
The value of the context property id is converted; the message body isn't used.

Example 3: Uppercase several regex matches

Input

gmt utc

Formula

toUpperCase(regex('gmt|utc',body))

Result

GMT
UTC

Test Expression tab: toUpperCase of a regex result returns GMT and UTC
regex returns two matches, and toUpperCase converts each one: two unique matches.

Notes

  • Use toUpperCase for case normalization: when systems log the same code in different cases, such as sek and SEK, toUpperCase(context('Currency')) stores one spelling, SEK. toLowerCase does the same in lowercase.

Next Steps