Accessing Field Data

Field data within an LCFieldlist object may be accessed as a property by name. The data type of the property depends on the data type of the field. The property is an array of LotusScript® data types, as shown in the table as follows. For example, if a fieldlist has a field named OrderID, its first value may be obtained with the following script:

Identification = fieldlist.OrderID(0)

The field may be set with the following syntax:

fieldlist.OrderID = "Bart-001"

The LCFieldlist object may contain one or more values for each field contained within, depending on the parameters to the constructor. If the object is constructed for more than a single value, subsequent values may be accessed through the field names by changing the subscript. Multiple values may be set by assigning an array.

The value is an array even if the field contains just a single value (as is commonly the case). The array index always starts at zero, as is usual for a LotusScript® array, whereas the index value supplied as a parameter to various methods, starts at one. When using the fieldlist.fieldname format, you must subtract one to get the equivalent index.

Note: The following syntax is not legal:
fieldlist.OrderID(0) = "Bart-001"  ' NOT VALID

You can not specify an index on the preceding side of the = assignment operator; you must assign the whole field. If the field is multivalued, use an array on the following side of the = or else use the LCField properties to assign one value at a time.

Field Type

Value Return Type

LCTYPE_CURRENCY

Currency

LCTYPE_DATETIME

Variant (Date/Time)

LCTYPE_INT

Long

LCTYPE_FLOAT

Double

LCTYPE_NUMERIC

Double

LCTYPE_TEXT

String

LCTYPE_BINARY

String