Returns the maximum length of the field as specified when you create the field using Rational ClearQuest Designer. This value corresponds to the number of bytes allowed in the column. The actual number of characters allowed depends on the database encoding (that is, the character set and character set encoding) and the characters in the field string.
This method is relevant only for fields whose type is SHORT_STRING.
VBScript
entity.GetFieldMaxLength field_name
Perl
$entity->GetFieldMaxLength(field_name);
VBScript
' Check the maximum length of a string field.
fieldType = GetFieldType("field1")
If fieldType = AD_SHORT_STRING Then
maxLength = GetFieldMaxLength("field1")
End If
Perl
# Check the maximum length of a string field.
$fieldtype = $entity->GetFieldType("field1");
if ($fieldtype eq $CQPerlExt::CQ_SHORT_STRING)
{
$maxlength = $entity->GetFieldMaxLength("field1");
}