Count

説明

コレクション内のアイテム数を戻します。AttachmentField タイプのフィールド数を取得します (なし、また多数)。このプロパティは読み取り専用です。

構文

VBScript

collection.Count 

Perl

$collection->Count(); 
識別子
説明
collection
AttachmentFields コレクション オブジェクトは、レコード内のすべての添付ファイル フィールドを表します。
戻り値
コレクション オブジェクト内のアイテム数を示す Long。このコレクションには常に、少なくとも 1 つのアイテムが含まれています。

VBScript

set attachFields = entity.AttachmentFields 
numFields = attachFields.Count
For x = 0 to numFields - 1
     set oneField = attachFields.Item x 
     ' ... 
Next

Perl

# Get the list of attachment fields

$attachfields = $entity->GetAttachmentFields()



# Find out how many attachment fields there

# are so the for loop can iterate them

$numfields = $attachfields->Count();



for ($x = 0; $x < $numfields ; $x++)

 {

 # Get each attachment field

 $onefield = $attachfields->Item($x);



 # ...do some work with $onefield

 } 

フィードバック