Share via


DictField.flags Method

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

Syntax

public int flags([str ext, Common record])

Run On

Called

Parameters

  • ext
    Type: str

Return Value

Type: int
An integer value, where each bit corresponds to a field flag.

Remarks

Use the Global::bitTest Method method or the & operator to check individual flag values.

Examples

The following example shows the retrieval of the flags of a field 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

DictField Class

Global::bitTest Method