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.
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.
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