Foreign_Field_Option - DataDictionary

Allows you to assign additional item options to a field when that field is used as a parent field

Type: Property

Access: Read/Write

Data Type: Integer

Parameters: Integer iField Integer iOption

ParameterDescription
iFieldNumber of the column in the table
iOptionOption(s) to assign


Syntax
 Property Integer Foreign_Field_Option

Read Access: Get Foreign_Field_Option iField iOption to IntegerVariable
Write Access: Set Foreign_Field_Option iField iOption to IntegerVariable/Value


Description

When an entry item refers to a table.column that is an ancestor of its DataDictionary object's (DDO's) main_file, that field is considered to be a foreign field. Very often foreign fields require additional item-option settings. For example, a foreign field may require an additional DD_NoPut or DD_DisplayOnly.

The Foreign_Field_Option property allows you to assign additional item options to individual foreign columns. The Foreign_Field_Options property allows you to apply foreign field options to groups of foreign table columns.

See the Field_Options property for a complete list of available field properties.

See Defining Data Dictionary Foreign Fields Attributes in the Data Dictionary Guide for a conceptual review of Foreign Fields.

Sample

Set Foreign_Field_Option Field Customer.Address DD_DisplayOnly to True

These can be cleared like this:

Set Foreign_Field_Option Field Customer.Address DD_DisplayOnly to False


Often foreign fields will be assigned field properties based on whether the field is a key field, an index field, or a non-indexed (default) field. It is common for a key field to be DD_AutoFind and DD_NoPut, for an index field to be DD_NoPut, and for a non-indexed field to be DD_DisplayOnly. Three special iField values allow you to set properties for all fields of these types. These integers are DD_KeyField, DD_IndexField, and DD_Default.

Samples

Set Foreign_Field_Option DD_KEYFIELD DD_FINDREQ to True
Set Foreign_Field_Option DD_KEYFIELD DD_AUTOFIND to True
Set Foreign_Field_Option DD_INDEXFIELD DD_NOPUT to True
Set Foreign_Field_Option DD_DEFAULT DD_DISPLAYONLY to True

These can be cleared like this:

Set Foreign_Field_Option DD_DEFAULT DD_DISPLAYONLY to False

See Also

Field_Option | Foreign_Field_Options