Power Query
published
Search
⌃K

Record.AddField

Record.AddField

Adds a field to a record.
function (record as record, fieldName as text, optional value as nullable any, optional delayed as nullable any) as record

Description

Adds a field to a record record, given the name of the field fieldName and the value value.

Category

Record.Transformations

Examples

Add the field Address to the record.
Record.AddField([CustomerID = 1, Name = "Bob", Phone = "123-4567"], "Address", "123 Main St.")
[CustomerID=1, Name= "Bob", Phone="123-4567", Address="123 Main St."]