Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Sintaksis
Type.ForRecord(fields as record, open as logical) as type
Tentang
Mengembalikan tipe yang mewakili rekaman dengan batasan jenis tertentu pada bidang.
Contoh 1
Menghasilkan jenis tabel secara dinamis.
Penggunaan
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}})
Hasil
#table(
type table [Name = text, Score = number],
{{"Betty", 90.3}, {"Carl", 89.5}}
)