LOTUSSCRIPT/COM/OLE CLASSES


Values property
Example

Read-write. The value(s) that an item holds.

Defined in

NotesItem

Data type

The data type depends upon the type of the item.

For reading, the data type of the item determines the data type of Values:

Item typeValues data type
Rich textString. The text in the field, rendered into plain text.
Text or text list (includes Names, Authors, and Readers item types)Array of String. A scalar value is a 1-element array.
Number or number listArray of Doubles. A scalar value is a 1-element array.
Date-time or range of date-time valuesArray of Variant of type DATE. A scalar value is a 1-element array.
AttachmentArray of String. The name of the attachment in the first element.
For writing, the data type of Values determines the data type of the item.
Data type of valueResulting NotesItem
StringText item containing the value
Array of StringText item containing each element of the value
Long, Integer, Double, Single, or CurrencyNumber item containing the value
Array of Long, Integer, Double, Single, or CurrencyNumber item containing each element of the value
Variant of type DATE, NotesDateTime, or NotesDateRange.Date-time item containing the value
Array of Variant of type DATE, array of NotesDateTime, or array of NotesDateRangeDate-time item containing each element of the value
NotesItemItem whose data type matches the NotesItem type and whose value(s) match the NotesItem value(s)
Type conversion occurs as necessary. For example, floating-point numeric items are double precision so a value of type Single is converted to Double prior to storage.

Syntax

To get: valueArray = notesItem.Values

To set: notesItem.Values = valueArray

Usage

For text, number, date-time items, and attachments this property always returns an array, even when there is only a single value in the item. If you know the item contains only a single value, access the first element in the array, which is at index 0. If you know the item contains multiple values, but you don't know how many, iterate over the array using the Forall statement.

For attachments, the attachment name can be passed to the GetAttachment method in NotesDocument.

This property returns the same value(s) for an item as the GetItemValue method in NotesDocument.

Language cross-reference

Values property in Java Item class

@Count function in formula language

@AttachmentNames function in formula language

Example
See Also