GetFieldDefNames

Descrizione

Restituisce i nomi di campi definiti nell'oggetto EntityDef.

L'elenco di campi non viene restituito in un ordine specifico. È necessario esaminare ogni voce dell'array fino a quando non si individua il nome del campo desiderato.

Come per le altre parti di un oggetto EntityDef, l'amministratore imposta i campi definiti utilizzando Rational ClearQuest Designer. Tali stati non possono essere impostati direttamente dall'API.

Sintassi

VBScript

entitydef.GetFieldDefNames 

Perl

$entitydef->GetFieldDefNames(); 
Identificativo
Descrizione
entitydef
Un oggetto EntityDef corrispondente ad un tipo di record in uno schema.
Valore di ritorno
Per Visual Basic, viene restituito un valore Variant che contiene un array i cui elementi sono stringhe. Ciascuna stringa contiene il nome di un campo. Se l'oggetto EntityDef non contiene campi, il valore di ritorno sarà un valore Variant vuoto. In Perl, un riferimento ad un array di stringhe.

Esempi

VBScript

set sessionObj = GetSession
set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName())

sessionObj.OutputDebugString "Field names for " &
       entityDefObj.GetName()

' List the field names in the record
nameList = entityDefObj.GetFieldDefNames()
For Each fieldName in nameList
   sessionObj.OutputDebugString fieldName
Next 

Perl

$sessionObj = $entity->GetSession();
$entityDefObj = $sessionObj->GetEntityDef($entity->GetEntityDefName());
$sessionObj->OutputDebugString("Field names for "$entityDefObj->GetName());
$nameList = $entityDefObj->GetFieldDefNames();
foreach $fieldName (@$nameList)
   {
 $sessionObj->OutputDebugString($fieldName);
   } 

Feedback