RLOOKUP()
Purpose
Function to perform a cross-table lookup for a specified key expression
Syntax
RLOOKUP(<key expression>, <workarea | alias> [,<expN> | <tag name>])
See Also
SET RELATION, LOOKUP(), SEEK()
Description
The RLOOKUP() function looks up the specified <key expression> in the master index of the specified <workarea | alias>. The <workarea | alias> is the workarea or alias name of an open table. To search in an index which is not the current master index, the optional <expN> | <tag name> parameter can be used. The <expN> is for single indexes and indicates the required index by the numerical index order in which the indexes were opened. For tag / multiple indexes, the tag name must be specified as a string.
The RLOOKUP() function returns True (.T.) or False (.F.), depending on the success of the lookup operation.
This function is especially useful when used in the Applications Data Dictionary (ADD) for maintaining referential integrity rules. See the CREATE command for details of the Applications Data Dictionary.
Example
use func in 1 index funcno use depts in 2 index deptnum seek "300" ? iif(rlookup(depts->funcno,func,1),func->dept_name,"No Department.") Research and Development use customer.rdb index on account_no tag account_no index on upper(last_name) tag uplast index on zip tag zip ? rlookup("STEREK",customer,"uplast") .T.
Products
Recital, Recital Server