Field_Options - DataDictionary

Sets field options for the table's column

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: Integer iField

ParameterDescription
iFieldNumber of the column in the table


Syntax
 Property Integer Field_Options

Read Access: Get Field_Options iField to IntegerVariable
Write Access: Set Field_Options iField to IntegerVariable/Value


Description

When setting field options in the DataDictionary class at design-time, it is best to use Set Field_Option and not Set Field_Options. That way, the DataDictionary Modeler can figure out individual option settings.

However, something like clear-all-options is most easily accomplished with Set Field_Options. The drawback is that the Studio's DD class modeler won't know that you've done that. That probably doesn't matter too much because you are probably not doing this at design-time. You are probably doing this in some custom method that changes these options at runtime, rather than design time.

Because multiple options must often be applied to the same column, you are allowed to combine multiple options in a single line as follows:

Set Field_Options Field Customer.Id to DD_NoPut DD_AutoFind DD_CapsLock


Toggling / Clearing Field Options

Field Options can be toggled ON or OFF at the DataDictionary Object (DDO) or class level.

This sample clears all field options:

Set Field_Options Field Customer.State to DD_Clear_All_Field_Options


File and File_Field Interfaces

Many of the DataDictionary methods contain a two variants of the same message: Field_Message and File_Field_Message. For a complete description of these messages please refer to The Field and File_Field DD Interfaces.

The Field_ version of a message must use the keyword FIELD to identify the file.field name. The File_Field_ version must use the keyword FILE_FIELD to identify the file.field values. These should never be mixed!

// When using Field_ message use the FIELD keyword
Set Field_Options Field Customer.Customer_Name to DD_SkipFound

// When using the File_Field_ message use the FILE_FIELD keyword
Set File_Field_Options of oCustomer_DD File_Field Customer.Name to DD_SkipFound

See Also

Field_Option | File_Field_OptionsDefining Data Dictionary Field Attributes | Clear and Clear All | Defining Data Dictionary Foreign Fields Attributes