Item

Descrizione

Restituisce l'elemento specificato nella raccolta.

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

Sintassi

VBScript

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

Perl

$collection->Item(itemNum);
$collection->ItemByName(name); 
Identificativo
Descrizione
collection
Un oggetto Attachments, che rappresenta la serie di allegati in un campo di un record.
itemNum
Un valore Long utilizzato come un indice all'interno della raccolta. Questo indice è basato sullo 0 in modo che il primo elemento nella raccolta venga numerato con 0, non 1.
name
Una stringa 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