Record.ToList

Record

Converts a record to a list of its field values.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Record.ToList(record as record) as list

Parameters

NameTypeRequiredDescription
recordrecordYesThe record to convert to a list.

Return Value

listA list of the record's field values in field order.

Remarks

Record.ToList converts a record into a list containing only the field values, in the same order the fields appear in the record. Unlike Record.FieldValues, which is functionally identical, Record.ToList is named to emphasize the conversion semantics. Use this when you need to pass a record's values into list-oriented functions or when serializing record data.

Examples

Example 1: Convert first Sales row to a list

let
    Values = Record.ToList(Sales{0})
in
    #table({"Value"}, List.Transform(Values, each {_}))
Result
Value
11
2Alice
3Widget A
4Widgets
525
64
72024-01-15
8East

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks