[SPLIT] - Dele opp verdier
[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.
Syntaks
Syntaksen er
[SPLIT;[Attribute];Delimiter;0]
Attributt: The attribute containing the value to be split (e.g.,
[fornavn]
).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.
Inndata
[fornavn]
:Anne Mette
Uttrykk:
[SPLIT;[givenname]; ;0]
How it Works: The function splits the
givenname
attribute by the space character and returns the first segment (at index0
).Produksjon:
Anne
Get the Last Name
This example shows how to extract the last name from a full name string.
Inndata
[Visningsnavn]
:Anne Mette Olsen
Uttrykk:
[SPLIT;[DisplayName]; ;2]
How it Works: The function splits the
DisplayName
attribute by the space character and returns the third segment (at index2
).Produksjon:
Olsen