Record.ToList
RecordConverts a record to a list of its field values.
Syntax
Record.ToList(record as record) as listParameters
| Name | Type | Required | Description |
|---|---|---|---|
record | record | Yes | The record to convert to a list. |
Return Value
list — A 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 | |
|---|---|
| 1 | 1 |
| 2 | Alice |
| 3 | Widget A |
| 4 | Widgets |
| 5 | 25 |
| 6 | 4 |
| 7 | 2024-01-15 |
| 8 | East |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks