Count

설명

콜렉션에 있는 항목 수를 리턴합니다. AttachmentField 유형을 가진 필드의 수(없음 또는 복수)를 가져옵니다. 이 특성은 읽기 전용입니다.

구문

VBScript

collection.Count 

Perl

$collection->Count(); 
ID
설명
collection
레코드에 있는 모든 첨부 필드를 나타내는 AttachmentFields 콜렉션 오브젝트.
Return value
콜렉션 오브젝트 내의 항목 수를 표시하는 Long을 리턴합니다. 이 콜렉션에는 항상 적어도 하나의 항목이 포함됩니다.

예제

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

 } 

피드백