---
title: "concat Formula Function: Join Text in Nodinite Search Fields"
description: The concat Formula function joins static text, the message body, context properties, and the results of other functions into one string, such as an order prefix plus an ID.
---

# <i class="fal fa-function" aria-hidden="true"></i> Formula - concat

The `concat` [Formula][] function returns all its arguments joined, in order, into one string.

![Join static text, then the order id and customer name of an Order-to-Cash event with concat, animated walkthrough (7.12)][hero]  
*Animated walkthrough: `concat('formula','Plugin')` returns `formulaPlugin`, with no separator. On the JSON Order Received event of order ORD-10005 in the [Order-to-Cash demo][], `concat(jsonPath('$.orderId', body), ' / ', jsonPath('$.customer.name', body))` joins two [jsonPath][] results with a separator into `ORD-10005 / Tailspin Toys`.*  

## <i class="fal fa-code" aria-hidden="true"></i> Syntax

```text
concat(content, ..., content)
```

### Parameters

|Parameter|Required|Description|
|---|---|---|
|`content`|Yes, two or more|The parts to join: static text in single quotes, [body][], [context][], or the result of another function, such as [jsonPath][] or [substring][].|

### Returns

One string with the arguments joined in the order you list them, with no separator. To add a separator, pass it as static text: `concat(body, '-', context('id'))`.

That holds when every argument has one value. When an argument returns several values, `concat` returns one string per value, each joined with the other arguments. On `{"orderId":"ORD-10005","lines":[{"sku":"A"},{"sku":"B"}]}`, `concat(jsonPath('orderId', body), ' / ', jsonPath('lines[*].sku', body))` returns two values, `ORD-10005 / A` and `ORD-10005 / B`, and `concat(jsonPath('lines[*].sku', body), '|')` returns `A|` and `B|`.

## <i class="fal fa-list-ol" aria-hidden="true"></i> Examples

### Example 1: Join two static strings

#### Input

None; the formula uses only static text.

#### Formula

```text
concat('formula','Plugin')
```

#### Result

```text
formulaPlugin
```

![Test Expression tab: concat('formula','Plugin') returns formulaPlugin (7.12)][1]  
*Static text works without a message body; case is kept as written.*  

### Example 2: Append static text to the message body

#### Input

```text
Nod
```

#### Formula

```text
concat(body,'inite')
```

#### Result

```text
Nodinite
```

![Test Expression tab: concat(body,'inite') returns Nodinite for the message body Nod (7.12)][2]  
*The body comes first because it's the first argument.*  

### Example 3: Repeat the message body

#### Input

```text
Hey
```

#### Formula

```text
concat(body,body)
```

#### Result

```text
HeyHey
```

![Test Expression tab: concat(body,body) returns HeyHey for the message body Hey (7.12)][3]  
*The same source can be used more than once.*  

### Example 4: Prepend static text to a context property

#### Input

|Key|Value|
|---|---|
|`id`|`ination`|

#### Formula

```text
concat('Imag',context('id'))
```

#### Result

```text
Imagination
```

![Test Expression tab: concat('Imag',context('id')) returns Imagination for the context value ination (7.12)][4]  
*Static text and the value of the context property `id` are joined.*  

### Example 5: Join the result of jsonPath and static text

#### Input

|Key|Value|
|---|---|
|`id`|`{ "Id": 2 }`|

#### Formula

```text
concat(jsonPath('Id',context('id')),'A')
```

#### Result

```text
2A
```

![Test Expression tab: concat of jsonPath on a JSON context value and 'A' returns 2A (7.12)][5]  
*`jsonPath` reads `Id` from the JSON in the context property, and `concat` appends `A`.*  

### Example 6: Join two nested functions

#### Input

Message body:

```text
gmt
```

Message context:

|Key|Value|
|---|---|
|`id`|`utc`|

#### Formula

```text
concat(toUpperCase(regex('gmt|utc', body)), toUpperCase(substring(0,3, context('id'))))
```

#### Result

```text
GMTUTC
```

![Test Expression tab: concat of toUpperCase(regex) on the body and toUpperCase(substring) on the context returns GMTUTC (7.12)][7]  
*The first argument uppercases the regex match in the body; the second uppercases the first three characters of the context value.*  

![Message Context tab with the key id and the value utc (7.12)][8]  
*The context property `id` used by the second argument in Example 6.*  

## <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-eraser" aria-hidden="true"></i> [removebom][]  
* <i class="fal fa-right-left" aria-hidden="true"></i> [replace][]  
* <i class="fal fa-code" aria-hidden="true"></i> [replaceregex][]  
* <i class="fal fa-scissors" aria-hidden="true"></i> [substring][]  
* <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/Alter/concat_standaloneParameters.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_firstparameterfrombody.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_body_body.png
[4]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_context_as_content.png
[5]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_context_json-function.png
[7]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_nested.png
[8]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_nested_messageContext.png

[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/
[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/
[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
[hero]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/Formula_Concat.gif
[jsonPath]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/extract/jsonpath/
[Order-to-Cash demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/generate-o2c-demo-data/
[removebom]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/alter/removebom/
[replace]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/alter/replace/
[replaceregex]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/alter/replaceregex/
[Search Field Expressions]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/
[substring]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/alter/substring/
[Test Your Expression]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/#test-your-expression