Field_Related_File - BaseData_Set
Retrieves the related table of a relationship at the local DD level instead of the table level
Type: Property
Access: Read-Only
Data Type: Integer
Parameters: None
Parameters
| Parameter | Type | Description |
|---|---|---|
| iField | Integer | Related from column in table attached to current DD |
Syntax
Property Integer Field_Related_File
| Access Type | Syntax |
|---|---|
| Read Access: | Get Field_Related_File to IntegerVariable |
Description
Retrieves the related table of a relationship at the local DD level instead of the table level. Field_Related_Field retrieves the associated column.
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.
Note that this returns the values of the local DD relationships, which may not be the same as the current relationships. If pbUseDDRelates is False, this will still return the relationships defined locally, even if these are not the relationships currently being used.
Sample
This sample determines the table and column OrderHea.SalesPerson_Id is related to. if pbUseDDRelates is True, it uses Field_Related_File and Field_Related_Field to do so, if pbUseDDRelates is False, it uses the DF_FIELD_RELATED_FILE and DF_FIELD_RELATED_FIELD atrributes to do the same.
Procedure CheckRelatedColumnAndTable
Integer iFromCol iRelCol iRelTable
Get_FieldNumber OrderHea.SalesPerson_ID to iFromCol
If (pbUseDDRelates(Self)) Begin
Get Field_Related_File iFromCol to iRelTable
Get Field_Related_Field iFromCol to iRelCol
End
Else Begin
Get_Attribute DF_FIELD_RELATED_FILE of OrderHea.File_Number iFromCol to iRelTable
Get_Attribute DF_FIELD_RELATED_FIELD of OrderHea.File_Number iFromCol to iRelCol
End
End_Procedure
See Also