Table of Contents
VLink Class: Search Methods
VLink.FindLinked()
Declaration:
FindLinked( inRecID as Integer, inTableA as VTable, inTableB as VTable, inRecursionDirection as EVRecursionDirection = kFromParentToChild ) as VSet
Parameters:
- inRecID - The RecID of a record of the left table.
- inTableA - Left table of link.
- inTableB - Right table of link.
- inRecursionDirection - The direction of movement for a recursive link.
Description:
Returns the records from inTableB linked to the record with inRecID from inTableA. If zero records are found then it returns NIL.
For a recursive link you should specify the parameter inRecursionDirection. If you specify kFromParentToChild then the function will use child records of the inRecID record. Otherwise it will use parent record(s) of the inRecID record.
Example:
res = Link.FindLinked( rec, TblA, TblB )
VLink.FindExclusivelyLinked()
Declaration:
FindExclusivelyLinked( inRecID as Integer, inTableA as VTable, inTableB as VTable, inRecursionDirection as EVRecursionDirection = kFromParentToChild ) as VSet
Declaration:
- inRecID - The RecID of a record of the left table.
- inTableA - Left table of link.
- inTableB - Right table of link.
- inRecursionDirection - The direction of movement for a recursive link.
Description:
Returns the records from inTableB linked to the record inRecID of inTableA and only to it. If zero records are found then it returns NIL.
For a recursive link, you should specify the parameter inRecursionDirection. If you specify kFromParentToChild then the function will use child records of the inRecID record. Otherwise, it will use parent record(s) of the inRecID record.
Note: This function returns result different from FindLinked() function only for M : M link.
Example:
res = Link.FindExclusivelyLinked( rec, TblA, TblB )
VLink.FindAllLinked()
Declaration:
FindAllLinked( inTableA as VTable, inTableB as VTable, inRecursionDirection as EVRecursionDirection = kFromParentToChild ) as VSet
Parameters:
- inTableA - Left table of link.
- inTableB - Right table of link.
- inRecursionDirection - The direction of movement for a recursive link.
Description:
Returns all records of inTableB linked to any record of inTableA.If zero records are found then returns NIL.
Example:
tbl = Link.FindAllLinked( TblA, TblB )