Record.HasFields

 

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.

Returns true if the field name or field names are present in a record.

Record.HasFields(record as record, fields as any) as logical  

ArgumentDescription
recordThe Record to check against.
fieldsA text value or a list of text values.
Record.HasFields([CustomerID = 1, Name = "Bob", Phone = "123-4567"],"CustomerID") equals true  

Record.HasFields([CustomerID = 1, Name = "Bob", Phone = "123-4567"],{"CustomerID", "Address"}) equals false  

Show: