---
title: "Concatenate two text fields without null"
canonical: "https://support.appfire.com/space/JMCF/465207725/Concatenate%20two%20text%20fields%20without%20null"
format: markdown
---
> Macro (aura-html)

### Abstract

This code snippet concatenates two text fields ignoring null values

### Logic

Access the text fields, check for null values and concatenate them

### Snippet

```javascript
textutils.noNull(<First text field>) + "<Delimiter>" + textutils.noNull(<Second text field>)
```

### Placeholders

| **Placeholder** | **Description** | **Example** |
| --- | --- | --- |
| `<First text field>` | Accessing the first text field | `issue.get("description")` |
| `"<Delimiter>"` | Delimiter separating the text fields | `"\n"` |
| `<Second text field>` | Accessing the second text field | `issue.get("summary")` |

### Examples

The output of this code is a [String](https://docs.oracle.com/javase/7/docs/api/java/lang/String.html) which you could, for example, use in a Groovy expression, to calculate and display the concatenation of two text fields Customer Name and Machine details in a Calculated Text field.

```javascript
textutils.noNull(issue.get("Customer Name")) + textutils.noNull(issue.get("Machine details"))
```

### References

- [Variables used in a Groovy script](https://appfire.atlassian.net/wiki/spaces/JMCF/pages/465732169)
- [Issue interface](https://appfire.atlassian.net/wiki/spaces/JMCF/pages/465764748)
- [**Groovy Documentation**](http://groovy.codehaus.org/User+Guide)

### Related articles

> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** |  |
> | --- | --- |