DisplayNameHeader

Descrizione

Restituisce le chiavi univoche di allegati in questo campo.

Questa è una proprietà di sola lettura; può essere visualizzata ma non impostata. Le chiavi univoche vengono impostate con l'utilizzo di Rational ClearQuest Designer, non dell'API Rational ClearQuest.

Sintassi

VBScript

attachmentField.DisplayNameHeader 

Perl

$attachmentField->GetDisplayNameHeader(); 
Identificativo
Descrizione
attachmentField
Un oggetto AttachmentField che rappresenta un campo allegato di un record.
Valore di ritorno
Per Visual Basic, un valore Variant contenente un array i cui elementi sono stringhe. Ciascuna stringa contiene il DisplayName di un Oggetto Attachment associato a questo campo. Per Perl, un riferimento ad un array di stringhe.

Esempio

VBScript

' This example assumes there is at least 1 attachment field 
' associated with the record. 
set sessionObj = GetSession

set attachFields = entity.AttachmentFields 
set attachField1 = attachFields.Item(0) 

keys = attachField1.DisplayNameHeader 
x = 0 
For Each key in keys 
     sessionObj.OutputDebugString "Displaying key number " & x & " - " & key 
& vbcrlf
     x = x + 1 
Next 

Perl

# This example assumes that there is at least 1 attachment

# field associated with the record. Otherwise, GetAttachmentFields

# won't return anything interesting and an error would be generated

$session=$entity->GetSession();

# Get the collection of attachment fields

$attachfields = $entity->GetAttachmentFields();



# Get the first attachment fields

$attachfield1 = $attachfields->Item(0)



# Get the list of unique keys for identifying each attachment.

$keys = $attachfield1->GetDisplayNameHeader();



# Iterate through the list of keys and print the key value

$x = 0;

foreach $key (@$keys)

 {

 $session->OutputDebugString("Displaying key number".$x." - 
      ".$key);

 $x++;

 } 

Feedback