Record.FromListRecord.FromList
構文Syntax
Record.FromList(list as list, fields as any) as record
バージョン情報About
フィールド値の list
とフィールドのセットが指定されたときに、レコードが返されます。Returns a record given a list
of field values and a set of fields. fields
はテキスト値のリストか、レコードの型で指定できます。The fields
can be specified either by a list of text values, or a record type. フィールドが一意ではない場合は、エラーがスローされます。An error is thrown if the fields are not unique.
例 1Example 1
フィールド値のリストとフィールド名のリストからレコードが作成されます。Build a record from a list of field values and a list of field names.
Record.FromList({1, "Bob", "123-4567"}, {"CustomerID", "Name", "Phone"})
CustomerIDCustomerID | 11 |
---|---|
名前Name | BobBob |
PhonePhone | 123-4567123-4567 |
例 2Example 2
フィールド値のリストとレコードの型からレコードが作成されます。Build a record from a list of field values and a record type.
Record.FromList({1, "Bob", "123-4567"}, type [CustomerID = number, Name = text, Phone = number])
CustomerIDCustomerID | 11 |
---|---|
名前Name | BobBob |
PhonePhone | 123-4567123-4567 |