Table.FromRecords
Table.FromRecords(records as list, optional columns as any, optional missingField as nullable number) as table
records
Mengonversi , daftar rekaman, menjadi tabel.
Buat tabel dari rekaman, menggunakan nama bidang rekaman sebagai nama kolom.
Penggunaan
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Hasil
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
Buat tabel dari rekaman dengan kolom yang ditik dan pilih kolom angka.
Penggunaan
Table.ColumnsOfType(
Table.FromRecords(
{[CustomerID = 1, Name = "Bob"]},
type table[CustomerID = Number.Type, Name = Text.Type]
),
{type number}
)
Hasil
{"CustomerID"}