---
title: "toUpperCase Formula Function: Convert Text to Uppercase in Nodinite Search Fields"
description: The toUpperCase Formula function returns content in uppercase, from the message body, a context property, or another function such as regex. Use it to normalize case in Search Field values.
---

# :fa-function: Formula - toUpperCase

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

![Uppercase a customer name with toUpperCase, then check an order id prefix with startsWith, animated walkthrough (7.12)][4]  
*Animated walkthrough: on the Order Received JSON of the [Order-to-Cash demo][], `toUpperCase(jsonPath('$.customer.name', body))` returns `TAILSPIN TOYS`. The second half shows [startsWith][] on the order id.*  

## :fa-code: Syntax

```text
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.

## :fa-list-ol: Examples

### Example 1: Uppercase the message body

#### Input

```text
gmt
```

#### Formula

```text
toUpperCase(body)
```

#### Result

```text
GMT
```

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

### Example 2: Uppercase a context property

#### Input

|Key|Value|
|---|---|
|`id`|`gmt`|

#### Formula

```text
toUpperCase(context('id'))
```

#### Result

```text
GMT
```

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

### Example 3: Uppercase several regex matches

#### Input

```text
gmt utc
```

#### Formula

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

#### Result

```text
GMT
UTC
```

![Test Expression tab: toUpperCase of a regex result returns GMT and UTC][3]  
*`regex` returns two matches, and `toUpperCase` converts each one: two unique matches.*  

## :fa-circle-info: 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.
* Letters are converted by the culture rules of the server that runs the [Logging Service][]. This matters only for a few letters, such as the Turkish dotted and dotless *i*.

## :fa-hand-point-right: Next Steps

* :fa-magnifying-glass-plus: [Add or manage Search Field][]  
* :fa-flask: [Test Your Expression][]  
* :fa-hard-drive: [Add or manage Log View][]  

## :fa-link-horizontal: Related Topics

* :fa-unlock: [base64decode][]  
* :fa-lock: [base64encode][]  
* :fa-language: [convert][]  
* :fa-arrow-down-a-z: [toLowerCase][]  
* :fa-function: [Formula][]  
* :fa-scroll: [Formula language rules][]  
* :fa-puzzle-piece: [Search Field Expressions][]  

[1]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Convert/touppercase_simplebody.png
[2]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Convert/touppercase_simplemessagecontext.png
[3]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Convert/touppercase_regex.png
[4]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Logical/Formula_UpperCaseStartsWith.gif

[Add or manage Log View]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/Add%20or%20Manage%20Log%20View.md
[Add or manage Search Field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md
[base64decode]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Convert/base64decode.md
[base64encode]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Convert/base64encode.md
[body]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Source/body.md
[Context]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Source/context.md
[convert]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Convert/convert.md
[Formula]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Overview.md
[Formula language rules]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Overview.md#fa-scroll-formula-language-rules
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Order-to-Cash demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md
[regex]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/regex.md
[Search Field]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/What%20is%20a%20Search%20Field.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md
[startsWith]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Logical/startsWith.md
[Test Your Expression]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md#test-your-expression
[toLowerCase]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Convert/toLowerCase.md