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

# <i class="fal fa-function" aria-hidden="true"></i> 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.*  

## <i class="fal fa-code" aria-hidden="true"></i> 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.

## <i class="fal fa-list-ol" aria-hidden="true"></i> 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.*  

## <i class="fal fa-circle-info" aria-hidden="true"></i> 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*.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Add or manage Search Field][]  
* <i class="fal fa-flask" aria-hidden="true"></i> [Test Your Expression][]  
* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Add or manage Log View][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-unlock" aria-hidden="true"></i> [base64decode][]  
* <i class="fal fa-lock" aria-hidden="true"></i> [base64encode][]  
* <i class="fal fa-language" aria-hidden="true"></i> [convert][]  
* <i class="fal fa-arrow-down-a-z" aria-hidden="true"></i> [toLowerCase][]  
* <i class="fal fa-function" aria-hidden="true"></i> [Formula][]  
* <i class="fal fa-scroll" aria-hidden="true"></i> [Formula language rules][]  
* <i class="fal fa-puzzle-piece" aria-hidden="true"></i> [Search Field Expressions][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Convert/touppercase_simplebody.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Convert/touppercase_simplemessagecontext.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Convert/touppercase_regex.png
[4]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Logical/Formula_UpperCaseStartsWith.gif

[Add or manage Log View]:https://docs.nodinite.com/administration/log-management/log-views/features/add-or-manage-log-view/
[Add or manage Search Field]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/
[base64decode]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/convert/base64decode/
[base64encode]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/convert/base64encode/
[body]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/source/body/
[Context]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/source/context/
[convert]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/convert/convert/
[Formula]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/overview/
[Formula language rules]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/overview/#fa-scroll-formula-language-rules
[Logging Service]:https://docs.nodinite.com/core-services/logging-service/overview/
[Order-to-Cash demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[regex]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/extract/regex/
[Search Field]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[Search Field Expressions]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/
[startsWith]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/logical/startswith/
[Test Your Expression]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/#test-your-expression
[toLowerCase]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/convert/tolowercase/