GetFieldDefNames

説明

EntityDef オブジェクトに定義されたフィールド名を戻します。

フィールドのリストは順不同で戻されます。求めているフィールドの名前を検出するまで、配列の各項目を調べる必要があります。

EntityDef オブジェクトの他の部分と同様に、管理者が Rational® ClearQuest® Designer を使用して定義済みフィールドを設定します。 これらは、API から直接には設定できません。

構文

VBScript

entitydef.GetFieldDefNames 

Perl

$entitydef->GetFieldDefNames(); 
識別子
説明
entitydef
スキーマ内のレコード タイプに対応する EntityDef オブジェクト。
戻り値
Visual Basic の場合、エレメントが文字列の配列を含む Variant が戻されます。各文字列には、1 つのフィールド名が含まれています。EntityDef オブジェクトにフィールドがない場合、戻り値は空の Variant です。Perl の場合は、文字列の配列への参照。

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

フィードバック