DisplayNameHeader
Description
Returns the unique keys of the history items in this field.
This is a read-only property; it can be viewed but not set. The unique keys are set using Rational® ClearQuest® Designer, not the Rational ClearQuest API.
Syntax
VBScript
historyField.DisplayNameHeader
Perl
$historyField->GetDisplayNameHeader();
- Identifier
- Description
- historyField
- A HistoryField object, representing one field of a record.
- Return value
- For Visual Basic, a Variant containing an Array whose elements are strings is returned. Each String contains the unique key of the corresponding item in the field's collection of Histories objects.For Perl, a reference to an array of strings.
Examples
VBScript
' This example assumes there is at least 1 history field
' associated with the record.
set sessionObj = GetSession
set historyFields = entity.HistoryFields
set historyField1 = historyFields.Item(0)
keys = historyField1.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 history
# field associated with the record. Otherwise, GetHistoryFields
# won't return anything interesting and an error would be generated
$session = $entity->GetSession();
# Get the collection of history fields
$historyfields = $entity->GetHistoryFields();
# Get the first history field
$historyfield1 = $historyfields->Item(0)
# Get the list of unique keys for identifying each history.
$keys = $historyfield1->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++;
}