지정된 필드에 저장할 수 있는 데이터 유형을 식별합니다.
GetFieldDefNames 메소드를 사용하여 올바른 필드 이름의 목록을 얻을 수 있습니다.
레코드 유형은 해당 데이터 레코드의 각 필드에 저장할 수 있는 데이터 유형을 제어합니다. 필드에는 문자열, 숫자, 시간소인, 참조 등을 저장할 수 있습니다. (전체 목록은 FieldType 상수를 참조하십시오.)
EntityDef 오브젝트의 다른 부분처럼, 관리자는 Rational® ClearQuest® Designer를 사용하여 정의된 필드를 설정합니다. API에서 직접 설정할 수 없습니다.
VBScript
entitydef.GetFieldDefType field_def_name
Perl
$entitydef->GetFieldDefType(field_def_name);
VBScript
set sessionObj = GetSession
set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName())
sessionObj.OutputDebugString "Integer fields of " & _
entityDefObj.GetName()
' List the field names in the record that contain integers
nameList = entityDefObj.GetFieldDefNames()
For Each fieldName in nameList
fieldType = entityDefObj.GetFieldDefType(fieldName)
if fieldType = AD_INT Then
sessionObj.OutputDebugString fieldName
End If
Next
Perl
$sessionObj = $entity->GetSession();
$entityDefObj =
$sessionObj->GetEntityDef($entity->GetEntityDefName());
$sessionObj->OutputDebugString("Integer fields of ".$entityDefObj.GetName());
# List the field names in the record that contain integers
$nameList = $entityDefObj->GetFieldDefNames();
foreach $fieldName (@$nameList)
{
$fieldType = $entityDefObj->GetFieldDefType($fieldName);
if ($fieldType eq $CQPerlExt::CQ_INT)
{
$sessionObj->OutputDebugString($fieldName);
}
}