User Tools

Site Tools


listlinkingfields_map_pairs_of_linked_fields_.htm
Navigation:  ABC Library Reference > RelationManager > RelationManager Methods >====== ListLinkingFields (map pairs of linked fields) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

ListLinkingFields( relationmanager, fieldpairs [, recursed] )

blk2blue.jpg

ListLinkingFields Maps pairs of linking fields between the primary file and a related file.
relationmanager The label of the related file's RelationManager object.
Fieldpairs The label of the FieldPairsClass object to receive the linking field references.
Recursed A numeric constant, variable, EQUATE, or expression that indicates whether this method was called by itself (recursive). A value of zero (0) indicates a non-recursive call; a value of one (1) indicates a recursive call. This allows the method to get the list of linking fields from the relationmanager if necessary–since only one side of the relationship maintains the list of linking fields. If omitted, recursed defaults to zero (0). You should always omit this parameter when calling the ListLinkingFields method from your program.

The ListLinkingFields method maps pairs of linking fields between the primary file and a related file.

Implementation:

The RelationManager object does not use the resulting mapped fields, but provides this mapping service for the ViewManager class, etc.

Example:

ViewManager.AddRange PROCEDURE(*? Field,RelationManager MyFile,RelationManager HisFile)

CODE                                             !add range limit to view

SELF.Order.LimitType = Limit:File                !set limit type: relationship

!get linking fields

MyFile.ListLinkingFields(HisFile,SELF.Order.RangeList)

ASSERT(RECORDS(SELF.Order.RangeList.List))       !confirm Range limits exist

SELF.SetFreeElement                              !set free key element

listlinkingfields_map_pairs_of_linked_fields_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1