Item

Description

Restituisce l'elemento specificato nella raccolta.

L'argomento per questo metodo può essere un indice numerico (itemNum) o un valore String (name).

Sintassi

VBScript

collection.Item(itemNum) 
collection.Item(name) 

Perl

$collection->Item(itemNum);
$collection->ItemByName(name); 
Identificativo
Description
collection
Un oggetto Attachments, che rappresenta la serie di allegati in un campo di un record.
itemNum
Un valore Long che serve da indice nella raccolta. Questo indice è basato sullo 0 in modo che il primo elemento nella raccolta venga numerato con 0, non 1.
name
Un valore String che serve da chiave nella raccolta. Questa stringa corrisponde al valore dell'oggetto Attachment desiderato.
Valore di ritorno
L'oggetto Attachment nella posizione specificata della raccolta.

Esempio

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) 


Feedback