Difference between revisions of "LOOKUP()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to perform a cross-table lookup
 
Function to perform a cross-table lookup
 
  
 
==Syntax==
 
==Syntax==
 
LOOKUP(<exp>, <key expression>, <workarea | alias>)
 
LOOKUP(<exp>, <key expression>, <workarea | alias>)
 
  
 
==See Also==
 
==See Also==
[[CREATE]], [[MODIFY STRUCTURE]], [[RLOOKUP()]], [[SEEK()]], [[SET RELATION]]
+
[[RLOOKUP()]], [[SEEK()]], [[SET RELATION]]
 
+
  
 
==Description==
 
==Description==
The LOOKUP() function looks up the specified index <key expression> in the master index of specified <workarea | alias>.  The LOOKUP() function then evaluates the expression <exp>, and returns the value of the <exp> if the <key expression> is found.  The LOOKUP() function returns a null string if the <key expression> is not found. The lookup function can be very useful for dealing with calculated expressions in either the Application Data Dictionary or the Forms Designer.
+
The LOOKUP() function looks up the specified index <key expression> in the master index of specified <workarea | alias>.  The LOOKUP() function then evaluates the expression <exp>, and returns the value of the <exp> if the <key expression> is found.  The LOOKUP() function returns a null string if the <key expression> is not found.  
 
+
  
 
==Example==
 
==Example==
Line 23: Line 19:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 10:29, 9 February 2012

Purpose

Function to perform a cross-table lookup

Syntax

LOOKUP(<exp>, <key expression>, <workarea | alias>)

See Also

RLOOKUP(), SEEK(), SET RELATION

Description

The LOOKUP() function looks up the specified index <key expression> in the master index of specified <workarea | alias>. The LOOKUP() function then evaluates the expression <exp>, and returns the value of the <exp> if the <key expression> is found. The LOOKUP() function returns a null string if the <key expression> is not found.

Example

use depts in 2 index dnum
use funcs in 1 index funcno
? lookup(depts->dname,funcs->dnum,depts)
Research and Development