field

field(source: text, separator: text, index: number) 🡒 text, pure function

Returns the nth field, zero-indexed from the left, in a text value that contains multiple sub-strings separated by a specified separator.

Example:

source = "a-b-c-d-"
show summary "" a1c3 with
  field(source, "-", 0)
  field(source, "-", 1)
  field(source, "-", 2)

This function is intended to facilitate parsing values that have been concatenated within a single table column.

See also