Determining the Attributes of a Data Item

The attributes of a Data item (for example, length, type, size) can be retrieved as shown in the following examples. In each of the examples, FieldName is a string variable containing the name of a field in the current Ispec buffer.

Field type

FieldType = Chr(mvarCurrentIspec.getFieldType(FieldName))

Field length

FieldLength = mvarCurrentIspec.getFieldLength(FieldName)

Note: The field length of an alpha field is -1.

Decimal places

DecimalPlaces = mvarCurrentIspec.getDecimalPlaces(FieldName)

Usage

In Component Enabler terms, a usage inquiry field or usage NOE field is marked as 'read only'. Any attempt to update the value of a 'read only' field generates a 933 error with a reason code of 205. The item is not be updated, so you can ignore the error if you wish.

You can check the read-only status of a field with a call as shown in the following example:

ReadOnly = mvarCurrentIspec.IsReadOnly(FieldName)