Identifies the type of data that can be stored in the specified field.
You can use the GetFieldDefNames method to obtain a list of valid field names.
The record type controls what type of data can be stored in each field of a corresponding data record. Fields can store strings, numbers, timestamps, references, and so on. (See the FieldType constants for the complete list.)
Like the other parts of an EntityDef object, the administrator sets the defined fields using Rational® ClearQuest® Designer. They cannot be set directly from the 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);
}
}