GetFieldDefNames

Description

Returns the field names defined in the EntityDef object.

The list of fields is returned in no particular order. You must examine each entry in the array until you find the name of the field you are looking for.

Like the other parts of an EntityDef object, the administrator sets the defined fields using HCL Compass Designer. They cannot be set directly from the API.

Syntax

VBScript


entitydef.GetFieldDefNames 

Perl


$entitydef->GetFieldDefNames(); 
Identifier
Description
entitydef
An EntityDef object corresponding to a record type in a schema.
Return value
For Visual Basic, a Variant containing an Array whose elements are strings is returned. Each String contains the name of one field. If the EntityDef object has no fields, the return value is an Empty Variant. For Perl, a reference to an array of strings.

Examples

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