function (table
as table, optionalcolumns
as nullable any, optionalmissingField
as nullable any) as table
table
with only the specified columns
. missingField
: (Optional) What to do if the columnn does not exist. Example: MissingField.UseNull
or MissingField.Ignore
.Table.FromRecords({ [Name = "Bob"], [Name = "Jim"] , [Name = "Paul"] , [Name = "Ringo"] })
Table.FromRecords({[CustomerID=1, Name="Bob"]})
[Expression.Error] The field 'NewColumn' of the record wasn't found.
MissingField.UseNull
creates a column of null values.Table.FromRecords({[CustomerID=1, NewColumn=null]})