Item
Description
Returns the specified item in the collection.
The argument to this method can be either a numeric index (itemNum) or a String (name).
Syntax
VBScript
collection.Item
(itemNum)
collection.Item
(name)
Perl
$collection->Item
(itemNum);
$collection->ItemByName
(name);
- Identifier
- Description
- collection
- An Attachments collection object, representing the set of attachments in one field of a record.
- itemNum
- A Long that serves as an index into the collection. This index is 0-based so the first item in the collection is numbered 0, not 1.
- name
- A String that serves as a key into the collection. This string corresponds to the value of the desired Attachment object.
- Return value
- The Attachment object at the specified location in the collection.
Example
VBScript
' This example assumes there is at least 1 attachment field
' associated with the record.
set currentSession = GetSession
set attachFields = AttachmentFields
set attachField1 = attachFields.Item(0)
set theAttachments = attachField1.Attachments
firstAttachment = theAttachments.Item(0)