Values (NotesItem - LotusScript®)

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 type

Values data type

Rich text

String. 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 list

Array of Doubles. A scalar value is a 1-element array.

Date-time or range of date-time values

Array of Variant of type DATE. A scalar value is a 1-element array.

Attachment

Array 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 value

Resulting NotesItem

String

Text item containing the value

Array of String

Text item containing each element of the value

Long, Integer, Double, Single, or Currency

Number item containing the value

Array of Long, Integer, Double, Single, or Currency

Number 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 NotesDateRange

Date-time item containing each element of the value

NotesItem

Item 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.

Example