Takes an expression — source — and sets the field defined by as to the result of the source expression.

Can be used to manipulate fields whose names are not statically known, but computed at runtime.

ParameterTypeRequiredDefault ValueDescription
asstringoptional[a] _getField Name of output field.
sourceexpressionrequired   An expression which evaluates the name of the field to read.

[a] Optional parameters use their default value unless explicitly set.

The function can be used to read fields whose exact name might not be known, by getting the value of a dynamically-named field. This happens when the field name is computed from an expression, so the function works by evaluating this expression as input.

It can also be used to manipulate fields whose names contain a space or - like in:

logscale
deltaTime:= now() - getField("time-in-ms")

getField() Examples

Click + next to an example below to get the full details.

Get the Value of a Field Stored in Another Field

Take Field Names as Parameters

Get the Last Element of an Array

Find the First Values in a List of Fields

Find the first values of a list of fields to normalize data using the coalesce() function