SetFieldlist Method for LCField

This method assigns the fieldlist value to the specified index of the field. If the field data type is different, an LCFAIL_INVALID_CONVERT error will occur.

Refer to the GetFieldList method for an explanation of fields that contain fieldlists as values.

Defined In

LCField

Syntax

Call thisField.SetFieldlist(index, srcFieldlist)

Parameters

Parameter

Description

index

Long. Index identifying the value that is to be assigned.

srcFieldlist

LCFieldlist. Value to be assigned to the field data value.

Example

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

Example Output

The sub fieldlist has successfully been appended to parent fieldlist as another field.