TEXTJOIN
- TEXTJOIN(delimiter, ignore_empty, *string_arrays)[source]
Joins text strings or string arrays with a specified delimiter, optionally ignoring empty values.
This function concatenates multiple strings or string arrays into a single text string. Delimiters can be a single string or an array of strings; if multiple delimiters are provided, they are applied cyclically across the inputs. If ignore_empty is True, empty strings are skipped in the concatenation.
- Parameters:
- Return type:
- Returns:
A formula representing the concatenated string.
- Raises:
ValueError – If no input strings are provided.
ValueError – If delimiter or any input string is not a valid string/string array.
ValueError – If ignore_empty is not BOOLEAN.
Examples
Simple join:
TEXTJOIN(",", True, "a", "b", "c") # Returns "a,b,c"
Join with empty strings ignored:
TEXTJOIN("-", True, "x", "", "y") # Returns "x-y"
``delimiter`` — accepted types
STRING
STRING_ARRAY
``ignore_empty`` — accepted types
BOOLEAN
``string_array`` (variadic) — accepted types
STRING
STRING_ARRAY
Return types
STRING