GetFieldDefNames

Descripción

Devuelve los nombres de campo definidos en el objeto EntityDef.

La lista de campos se devuelve sin ningún orden concreto. Debe examinar cada entrada de la matriz hasta encontrar el nombre del campo que está buscando.

Como los demás componentes de un objeto EntityDef, el administrador establece los campos definidos utilizando Rational ClearQuest Designer. No se pueden establecer directamente desde la API.

Sintaxis

VBScript

entitydef.GetFieldDefNames 

Perl

$entitydef->GetFieldDefNames(); 
Identificador
Descripción
entitydef
Un objeto EntityDef que corresponde a un tipo de registro de un esquema.
Valor de retorno
Para Visual Basic, un valor Variant que contiene una matriz cuyos elementos son series. Cada serie contiene el nombre de un campo. Si el objeto EntityDef no tiene campos, el valor de retorno es un Empty Variant. Para Perl, una referencia a una matriz de series.

Ejemplos

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);
   } 

Comentarios