> ## Documentation Index
> Fetch the complete documentation index at: https://docs.terminus.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Concatenation field

> A computed field that joins the values of other fields into one string with a separator, such as a UTM campaign name.

<Info>
  A **Concatenation** field is computed. It joins the values of other fields on the same record, in the order you list them, separated by a character you choose. The classic use is a campaign name like `awareness-us-black_friday`, built from a few dropdowns and a text field.
</Info>

## When to use it

* Building one canonical string out of several inputs, for example a UTM campaign name from goal, country, and a short label.
* Producing a deterministic identifier that should always follow the same shape across submissions.
* Feeding a clean value into a [Tagged URL](/reference/fields/tagged-url) parameter or a [Short URL](/reference/fields/short-url) slug.

<Warning>
  Don't use a Concatenation field to attach query parameters to a URL. The output is a plain string and is not URL-aware. Use a [Tagged URL](/reference/fields/tagged-url) field, which handles the base URL and parameter encoding for you.
</Warning>

## How it is configured

A Concatenation field is computed, so it is always required and submitters never type into it. In the field editor you set:

| Setting                   | Required | Default | What it does                                                                                                                                                     |
| ------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parts`                   | Yes      | None    | The ordered list of fields to join. Each part references one other field by its ID. You pick the fields and drag to reorder them. At least one part is required. |
| `separator`               | No       | empty   | The character or string placed between parts, for example `-`, `_`, or a space.                                                                                  |
| `remove_extra_separators` | No       | `false` | When on, a part whose value is blank is dropped entirely, so you don't get doubled separators. Cannot be combined with `empty_field_replacement`.                |
| `empty_field_replacement` | No       | None    | A placeholder string used in place of any blank part, which keeps the separator count steady. Only available when `remove_extra_separators` is off.              |
| `unique`                  | No       | `false` | When on, the computed value must be unique across the account's records.                                                                                         |

Each part references another field, not a literal string. Adding the same field twice is prevented, and you cannot add a new part until every existing part has a field selected.

When the submission is saved, Terminus reads each referenced field's current value on that record, applies your empty-value rule, and joins the results with the separator.

## A worked example

In the Campaign URL Builder, a `utm_campaign` Concatenation field joins a goal dropdown, a country dropdown, and a campaign label into one tracking string.

```yaml theme={null}
type: concatenation
settings:
  parts:
    - { type: field, value: goal }
    - { type: field, value: country }
    - { type: field, value: campaign_label }
  separator: "-"
  remove_extra_separators: true
```

For a submission where `goal` is `awareness`, `country` is `us`, and `campaign_label` is `black_friday`, the field computes:

```text theme={null}
awareness-us-black_friday
```

If the submitter leaves `country` blank, `remove_extra_separators: true` drops that part and the separators around it collapse:

```text theme={null}
awareness-black_friday
```

Without `remove_extra_separators`, the same blank value would produce `awareness--black_friday` (two dashes where the country used to be). Switch to `empty_field_replacement` instead when you want a visible placeholder like `na` in that gap.

The resulting `utm_campaign` value is then a clean input for the [`utm_campaign` parameter of a Tagged URL field](/reference/fields/tagged-url).

## Gotchas

* **You cannot use both empty-value strategies at once.** `remove_extra_separators` and `empty_field_replacement` are mutually exclusive. The editor hides the replacement input while "Remove extra separators" is on.
* **Parts can only reference other fields.** There is no literal-text part. To inject a fixed string, use a [Constant](/reference/fields) field as one of the parts, or put the character in `separator` (it then appears between every part).
* **The separator is inserted as-is, not URL-encoded.** If the output flows into a URL, keep the separator URL-safe (`-`, `_`, `.`) and avoid spaces or `&`. Encoding only happens later, inside a [Tagged URL](/reference/fields/tagged-url) field.
* **A part that points at a missing or blank field contributes nothing useful.** With `remove_extra_separators` off, a blank part becomes an empty segment; with it on, the part is dropped. Reordering or removing parts only affects records created afterward; existing approved records keep their stored value.

## Related

* [Field types overview](/reference/fields)
* [Tagged URL field](/reference/fields/tagged-url): the usual downstream consumer of a Concatenation value.
* [Short URL field](/reference/fields/short-url): can use a Concatenation value as a slug source.
* [UTM tagging recipe](/recipes/tagged-url-utm)
