LOTUSSCRIPT/COM/OLE CLASSES


GetItemValue method
Example

Given the name of an item, returns the value of that item in a document.

Defined in

NotesDocument

Syntax

valueArray = notesDocument.GetItemValue( itemName$ )

Parameters

itemName$


Return value

value


Usage

If multiple items have the same name, this method returns the value of the first item.

For text, number, and time-date items, GetItemValue 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 elements using the Forall statement.

To get a date-time value as an array of NotesDateTime and NotesDateRange objects, see GetItemValueDateTimeArray.

"Extended class" syntax

You can also access the contents of an item directly, without using GetItemValue. The following two statements are equivalent:


This syntax lets you access and modify items the same way you access and modify other NotesDocument properties. The return value is the same, that is, an array of values for text, number, or time-date items, and a string for rich text items.

You can set the value of an item with this syntax, too:


For more information about setting an item value with this syntax, see the AppendItemValue and ReplaceItemValue methods.

Language cross-reference

getItemValue method in Java Document class

@Count function in formula language

@GetDocField function in formula language

@GetField function in formula language

@GetProfileField function in formula language

Example
See Also