Hi DAW,

IF pbUseDDRelates = True then the relate operation should use the DD's Ordering (if its defined) instead of the index defined by DF_FIELD_INDEX.

This happens on multi-segment relationships - see example:

Code:
  Object oCATMAS_DD is a Catmas_DataDictionary
    Set Ordering to 2
    Set pbUseDDRelates to True
  End_Object 

  Object oCATMANF_DD is a Catmanf_DataDictionary
    Set DDO_Server to oCATMAS_DD
    Set pbUseDDRelates to True
    Set Field_Related_FileField Field CATMANF.CAT_ID      to File_Field CATMAS.CAT_ID
    Set Field_Related_FileField Field CATMANF.SUPPLIER_ID to File_Field CATMAS.SUPPLIER_ID
    Set Field_Related_FileField Field CATMANF.MAN_CODE    to File_Field CATMAS.MAN_CODE
  End_Object
In this example, the CATMANF DD was unable to find the related record because the DF_FIELD_INDEX of CATMAS.CAT_ID is 1. The DD was priming the buffer and finding (EQ) CATMAS using index.1 (although the ORDERING is set to 2). Changing the DF_FIELD_INDEX of CATMAS.CAT_ID to 2 resolved the issue.

The DF_FIELD_INDEX is set and optimised for table based relationships/operations and may not work well with local DD relationships/operations as seen above.

Thanks.