Identifies the type of data that can be stored in the specified field.
The EntityDef Object controls what type of data can be stored in each field of an Entity object. Fields can store strings, numbers, timestamps, references, and so on. (See FieldType constants for the complete list.)
You cannot change the type of a field using the API. The field type is determined by the corresponding information in the EntityDef object and must be set by the administrator using Rational ClearQuest Designer.
You can use the GetFieldNames method to obtain a list of valid names for the field_name parameter.
VBScript
entity.GetFieldType(field_name)
Perl
$entity->GetFieldType(field_name);
VBScript
set sessionObj = GetSession ' Iterate through the fields and output ' the field name and type. fieldNameList = GetFieldNames For Each fieldName in fieldNameList fieldType = GetFieldType(fieldName) sessionObj.OutputDebugString "Field name: " & fieldName & _ ", type=" & fieldType Next
Perl
$sessionobj = $entity->GetSession(); # Iterate through the fields and output # the field name and type. $fieldnamelist = $entity->GetFieldNames(); foreach $fieldname (@$fieldnamelist) { $fieldtype = $entity->GetFieldType($fieldname); $sessionobj->OutputDebugString("Field name: ".$fieldname. ", type=".$fieldtype); }