- 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

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

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

regex returns two matches, and toUpperCase converts each one: two unique matches.
Notes
- Use
toUpperCasefor case normalization: when systems log the same code in different cases, such assekandSEK,toUpperCase(context('Currency'))stores one spelling,SEK. toLowerCase does the same in lowercase.