DictField Class

Provides information about a specified field in a specified table.

class DictField extends Object

Run On

Called

Methods

Method

Description

aliasFor

Returns the ID of the alias field, if the field is an alias for another field.

alignment

allowEdit

allowEditOnCreate

arraySize

Returns the array size for the field, that is, the array size of the underlying extended data type. If no array elements are created for the field, this method returns an array size of 1.

baseType

Returns the base type of the field, such as string, real, integer, date, time, enum, or container.

cancelTimeOut

Cancels a previous method call to the Object.setTimeOut Method. (Inherited from Object.)

configurationKeyId

Returns the ID of the configuration key for the field.

dateTimeTimeZoneRuleFieldName

displayHeight

displayLength

enumId

Returns the ID of the enumeration if the field is based on an enumeration.

equal

Determines whether the specified object is equal to the current one. (Inherited from Object.)

flags

Returns an integer that defines the properties of the field. The flag values, such as DBF_MANDATORY, are defined in the macro DictField.

getTimeOutTimerHandle

Returns the timer handle for the object. (Inherited from Object.)

handle

Retrieves the handle of the class of the object. (Inherited from Object.)

help

Returns the help text that is displayed for the field. If no help text is defined for the field, this method returns the help text for the extended data type that is used for the field, if applicable. If an array entry is specified, this method returns the help text for the array element.

helpDefined

Returns the defined help text that is displayed for the field. If an array entry is specified, this method returns the help text for the array element. Unlike the DictField.help Method, the helpDefined method does not return the extended data type help if the field is based on an extended data type and the field has no defined help.

id

Returns the ID of the field.

isMonocased

Returns a value that indicates whether the field is required by the database to be monocase.

isSql

Returns a value that indicates whether the field is in the SQL database.

isSystem

Returns a value that indicates whether the field is a system field.

label

Returns the label for the field. If no label is provided for the field, this method returns the label for the extended data type for the field, if applicable. If an array entry is specified, this method returns the label for the array element.

labelDefined

Returns the defined label text that is displayed for the field. Unlike the DictField.label Method, the labelDefined method does not return the extended data type label if the field is based on an extended data type and the field has no defined label.

mandatory

name

Returns the name of the field.

new

Overridden. Creates an instance of the DictField Class.

notify

Releases the hold on an object that has called a wait method on this object. (Inherited from Object.)

notifyAll

Releases a lock on the object that was issued by a wait method on this object. (Inherited from Object.)

objectOnServer

Determines whether the object is on a server. (Inherited from Object.)

owner

Returns the instance that owns the object. (Inherited from Object.)

qualifiedLabel

relationObject

Returns a DictRelation object for the field if the field is based on an extended data type that has a relation.

rights

Returns the current user's access rights that are specified for the field.

setTimeOut

Sets up the scheduled execution of a specified method. (Inherited from Object.)

stringLen

Returns the string size of the field if the base type of the field is a string.

tableid

Returns the ID of the table that contains the field.

toString

Returns a string that represents the current object. (Inherited from Object.)

type

Returns the data type of the field.

typeId

Returns the ID of the extended data type if the field is based on an extended data type.

usageCount

Returns the current number of references (the value of the reference counter) that the object has. (Inherited from Object.)

visible

wait

Pauses a process. (Inherited from Object.)

xml

Returns an XML string that represents the current object. (Inherited from Object.)

Example

The following example shows the creation of an instance of the DictField class to determine whether the field is mandatory.

#macrolib.dictfield

DictField df;

int       nFlags;

;

df = new DictField(tablenum(CustTable), fieldnum(CustTable, AccountNum));

if (df)
{
    nFlags = df.flags();
    if (bitTest(nFlags,#DBF_MANDATORY))
    {
        print ("The field is mandatory.");
    }
    else
    {
        print ("The field is not mandatory.");
    }

}

See Also

DictTable Class

DictType Class