[SPLIT] - Splitting Values
[SPLIT] function divides a text string from an attribute using a specified delimiter and returns one of the resulting segments. The segment to be returned is determined by a zero-based index.
Syntax
The syntax is:
[SPLIT;[Attribute];Delimiter;0]
Attribute: The attribute containing the value to be split (e.g.,
[givenname]).Delimiter: The character used to divide the string. For a space, this can be left empty.
Use Case
Get the First Name
This example shows how to extract the first part of a given name that contains a space.
Input
[givenname]:Anne MetteExpression:
[SPLIT;[givenname]; ;0]How it Works: The function splits the
givennameattribute by the space character and returns the first segment (at index0).Output:
Anne
Get the Last Name
This example shows how to extract the last name from a full name string.
Input
[DisplayName]:Anne Mette OlsenExpression:
[SPLIT;[DisplayName]; ;2]How it Works: The function splits the
DisplayNameattribute by the space character and returns the third segment (at index2).Output:
Olsen