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

# :fa-function: 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`.*  

## :fa-code: 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|`.

## :fa-list-ol: 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.*  

## :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-eraser: [removebom][]  
* :fa-right-left: [replace][]  
* :fa-code: [replaceregex][]  
* :fa-scissors: [substring][]  
* :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/Alter/concat_standaloneParameters.png
[2]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_firstparameterfrombody.png
[3]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_body_body.png
[4]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_context_as_content.png
[5]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_context_json-function.png
[7]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_nested.png
[8]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/concat_nested_messageContext.png

[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
[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
[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
[hero]:{ndm}/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/Plugins/Formula/Alter/Formula_Concat.gif
[jsonPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/jsonPath.md
[Order-to-Cash demo]:{ndr}/Repository%20Model/BPMs/Examples/Order-to-Cash/Generate-O2C-Demo-Data.md
[removebom]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Alter/removebom.md
[replace]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Alter/replace.md
[replaceregex]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Alter/replaceregex.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md
[substring]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Alter/substring.md
[Test Your Expression]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Add%20or%20manage%20Search%20Field.md#test-your-expression