このメソッドは、フィールドリストの値を、フィールドの指定されたインデックスに割り当てます。フィールドのデータ型が異なる場合は、LCFAIL_INVALID_CONVERT エラーが発生します。
値としてフィールドリストが格納されるフィールドについては、GetFieldList メソッドの説明を参照してください。
LCField
Call thisField.SetFieldlist(index, srcFieldlist)
パラメータ |
説明 |
---|---|
index |
Long。割り当てる値を識別するインデックスです。 |
srcFieldlist |
LCFieldlist。フィールドのデータ値に割り当てる値です。 |
Option Public
Option Explicit
Uselsx "*lsxlc"
Sub Initialize
Dim Record As New LCFieldList
Dim SubRecord As New LCFieldList
Dim field As LCField
' start building FieldList
Set field = Record.Append ("group", LCTYPE_INT)
field.Value = 4200
' Build SubFieldList
Set field = SubRecord.Append ("category", LCTYPE_TEXT)
field.Value = "potato"
Set field = SubRecord.Append ("description", LCTYPE_TEXT)
field.Value = "russet"
Set field = SubRecord.Append ("sku", LCTYPE_INT)
field.Value = 4207
' return to building the FieldList
Set field = Record.Append ("item", LCTYPE_FIELDLIST)
' now assign the SubRecord to the Record
Call field.SetFieldList (1, SubRecord)
' Take a look at the Record while debugging the LotusScript
Print "The sub fieldlist has successfully been appended to parent fieldlist as another field."
End Sub
The sub fieldlist has successfully been appended to parent fieldlist as another field.