3.48 Fields

Contains the Field objects for an AddressBookEntry, Document, or Message object.

3.48.1 Properties

The following table lists properties along with their access and descriptions.

Property

Access

Description

Application

R/O

Application. The Application object.

Count

R/O

Long. The number of objects in this collection.

_NewEnum

R/O

Enumeration object. Implements IEnumVARIANT. For Windows only.

Parent

R/O

Object. The Account, AddressBookEntry, or Document object that owns this collection.

3.48.2 Methods

Field Add(String Name, FieldTypeConstants FieldType, VARIANT Value)

Adds a Field with the given Name, FieldType (see FieldTypeConstants), and Value to the collection. Throws an exception if a FieldDefinition with the same Name and FieldType does not exist.

Field Item(String FieldName, FieldTypeConstants FieldType)

DEFAULT. Returns the Field object with the given FieldName and FieldType. See FieldTypeConstants. FieldName must be a string.

Field Item(Long Index)

DEFAULT. Returns the Field object located at the given Index in the collection. Valid indexes are 1 through Count inclusive. Throws an exception when Index is outside of this range.

3.48.3 Remarks

The Item method template is as follows:

Item(VARIANT P1, [VARIANT P2]).

The Item method checks the P1 type at runtime.

  • If P1 is an string, the first form of Item is assumed; P2 must be a FieldType of type FieldTypeConstants.

  • If P1 is a Long, the second form of Item is assumed; P2 is ignored.

A Fields collection is refreshed when its parent object is refreshed.