OpenBI Docs Buy

Record.FromList

A record made from a list of values and the names to give them.

Group: Record. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Record.FromList(list as list, fields as any) as record
ParameterTypeDescription
listlistThe values, in order.
fieldsanyThe field names: a list of texts, a record type, or a record whose field names are used.

Returns

record. One field per value.

Remarks

  • The list and the names must be as many, and each name may come once: otherwise an error.

Examples

Values and names

Record.FromList({1001, "Oslo", 120}, {"Order", "Shop", "Total"})
[Order = 1001, Shop = "Oslo", Total = 120]

Names from a record type

Record.FromList({1001, "Oslo"}, type [Order = number, Shop = text])
[Order = 1001, Shop = "Oslo"]

Record.ToList, Record.FromTable, List.Zip.

Last updated · OpenBI Studio 0.3.79