Record.AddField
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
Adds a field from a field name and value.
Record.AddField (record as record, fieldName as text, value as any,optional delayed as nullable logical) as record
| Argument | Description |
|---|---|
| record | The Record to modify. |
| fieldName | The value to name the field. |
| value | The value to add to the field. |
| optional delayed | Indicates whether the field value or a function that computes the field value. |
Record.AddField( [CustomerID = 1, Name = "Bob", Phone = "123-4567"] , "Address", "123 Main St.")
equals [CustomerID=1, Name= "Bob", Phone="123-4567", Address="123 Main St."]
| CustomerID | 1 |
| Phone | 123-4567 |
| Address | 123 Main St. |
Show: