Skip to main content

CalculatedColumnOnError<TValue>

CalculatedColumnOnError<TValue> = { errorColumn?: string | boolean; mode?: "empty"; } | { errorColumn?: string | boolean; mode: "value"; value: TValue; } | { mode: "stop"; }

Defined in: js-api/src/dataframe/column-list.ts:38

What a calculated column does with the rows its formula fails on.

  • 'empty' (the default): the cell stays empty.
  • 'value': the cell gets value, converted to the column's type; a value that does not fit leaves it empty.
  • 'stop': the first such row rejects the call, and no column is added.

errorColumn also adds a string column with each failed row's message, next to the result: a name, or true for "<column> errors". It is recalculated with the result and kept in layouts.

Type Parameters​

Type ParameterDefault type
TValueCalculatedColumnValue<"auto">