Concatenate two text fields without null
Abstract
This code snippet concatenates two text fields ignoring null values
Logic
Access the text fields, check for null values and concatenate them
Snippet
textutils.noNull(<First text field>) + "<Delimiter>" + textutils.noNull(<Second text field>)Placeholders
Placeholder | Description | Example |
|---|---|---|
| Accessing the first text field |
|
| Delimiter separating the text fields |
|
| Accessing the second text field |
|
Examples
The output of this code is a String 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.
textutils.noNull(issue.get("Customer Name")) + textutils.noNull(issue.get("Machine details"))