Record.HasFields

This function checks if a record contains specified fields by returning a logical value (true or false). Multiple field values can be provided in a list format.

Syntax

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

About

This function checks if a record contains specified fields by returning a logical value (true or false). Multiple field values can be provided in a list format.

Explanation

Verify if the record contains the field "CustomerID". Syntax: Power Query MRecord.HasFields([CustomerID = 1, Name = "Bob", Phone = "123-4567"], "CustomerID") Result: true Verify if the record contains the fields "CustomerID" and "Address". Syntax: Power Query MRecord.HasFields([CustomerID = 1, Name = "Bob", Phone = "123-4567"], {"CustomerID", "Address"}) Result: false