The split helper breaks a string into substrings based on a specified delimiter and returns either a specific element by index or the element at position 0 by default. Use it to extract parts of delimited strings such as names, codes, or identifiers.
Syntax
{{split field delimiter index}}
field -- The field or variable containing the string to split (e.g. record.fullName). Required.
delimiter -- The character or characters used to split the string (e.g. "-", ",", " "). Required. Must match exactly -- a space and a hyphen are treated as different delimiters.
index -- The zero-based position of the substring to return. Optional. Defaults to 0 if omitted.
Examples
Extract specific parts of a delimited string
If record.fullName is "Hillary-Ann-Swank":
{{split record.fullName "-" 0}}
Output: Hillary
{{split record.fullName "-" 1}}
Output: Ann
{{split record.fullName "-" 2}}
Output: Swank
Return the first substring (no index)
{{split record.fullName "-"}}
Input: record.fullName is "Hillary-Ann-Swank"
Output: Hillary
Omitting the index argument returns the substring at position 0.
Usage notes
-
indexis zero-based: the first substring is at position0, the second at1, and so on. - If the delimiter doesn't appear in the string, the helper returns the entire string as a single element at index
0. - Delimiter matching is exact -- verify that the delimiter in your expression matches the actual character in the field value (e.g. a hyphen vs. a space).
- Use triple braces (
{{{ }}}) to return the raw output without Celigo's automatic string formatting.