Record.FieldNames

Updated on

Record.FieldNames is a Power Query M function that extracts the names of the fields in a record as text. The function returns a list containing the names of all the fields in the input record.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Record.FieldNames( record as record ) as list

Description

Record.FieldNames outputs a list of all field names contained in a record.

Examples

Find the names of the fields in the record.

// Output: {"OrderID", "CustomerID", "Item", "Price"}
Record.FieldNames( [OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0] )

Other functions related to Record.FieldNames are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/record-fieldnames