Napomena
Za pristup ovoj stranici potrebna je autorizacija. Možete se pokušati prijaviti ili promijeniti direktorije.
Za pristup ovoj stranici potrebna je autorizacija. Možete pokušati promijeniti direktorije.
Syntax
Type.ForRecord(fields as record, open as logical) as type
About
Returns a type that represents records with specific type constraints on fields.
Example
Dynamically generate a table type.
Usage
let
columnNames = {"Name", "Score"},
columnTypes = {type text, type number},
rowColumnTypes = List.Transform(columnTypes, (t) => [Type = t, Optional = false]),
rowType = Type.ForRecord(Record.FromList(rowColumnTypes, columnNames), false)
in
#table(type table rowType, {{"Betty", 90.3}, {"Carl", 89.5}})
Output
#table(
type table [Name = text, Score = number],
{{"Betty", 90.3}, {"Carl", 89.5}}
)