EntityDef オブジェクトに定義されたフィールド名を戻します。
フィールドのリストは順不同で戻されます。求めているフィールドの名前を検出するまで、配列の各項目を調べる必要があります。
EntityDef オブジェクトの他の部分と同様に、管理者が Rational ClearQuest Designer を使用して定義済みフィールドを設定します。 これらは、API から直接には設定できません。
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); }