Skip to content

Field_Related_FileField - BaseData_Set

Defines a relationship at the local DD level instead of the table level

Type: Property
Access: Write-Only
Data Type: Integer
Parameters: None

Parameters

Parameter Type Description
iField Integer Column to relate to
iRelatedFile Integer Table to relate to

Syntax

Set Field_Related_FileField Field Table.Column to File_Field iRelatedFile.iField
Access Type Syntax
Write Access: Set Field_Related_FileField to IntegerVariable/Value

Description

Defines a relationship at the local DD level instead of the table level.

Relates can either be defined by a table or by the DD. pbUseDDRelates determines if relates are defined by the table (False) or the DD (True). See pbUseDDRelates for more information.

"File_Field TableName.ColumnName" can be used to combine the two parameters.

Sample

Object Vendor_DD is a Vendor_DataDictionary
    Set pbUseDDRelates to True
End_Object    // Vendor_DD

Object Invt_DD is a Invt_DataDictionary
    Set DDO_Server to Vendor_DD

    // define local relationship
    Set pbUseDDRelates to True
    Set Field_Related_FileField Field Invt.Vendor_ID to File_Field Vendor.ID
End_Object    // Invt_DD

Object Customer_DD is a Customer_DataDictionary
    Set pbUseDDRelates to True
End_Object    // Customer_DD

Object SalesP_DD is a Salesp_DataDictionary
    Set pbUseDDRelates to True
End_Object    // SalesP_DD

Object OrderHea_DD is a OrderHea_DataDictionary
    Set DDO_Server to Customer_DD
    Set DDO_Server to SalesP_DD

    // define local relationship
    Set pbUseDDRelates to True
    Set Field_Related_FileField Field OrderHea.SalesPerson_ID to File_Field SalesP.ID
    Set Field_Related_FileField Field OrderHea.Customer_Number to File_Field Customer.Customer_Number
End_Object    // OrderHea_DD

Object OrderDtl_DD is a OrderDtl_DataDictionary
    Set DDO_Server to OrderHea_DD
    Set DDO_Server to Invt_DD
    Set Constrain_File to OrderHea.File_Number

    // define local relationship
    Set pbUseDDRelates to True
    Set Field_Related_FileField Field OrderDtl.Item_ID to File_Field Invt.Item_ID
    Set Field_Related_FileField Field OrderDtl.Order_Number to File_Field OrderHea.Order_Number
End_Object    // OrderDtl_DD

To cancel a relationship, set both iField and iRelatedFile to 0:

Set Field_Related_FileField Field OrderDtl.Item_ID to 0 0

See Also

Field_Related_File | Field_Related_Field