A 1-character string that specifies which lookup table record should supply the value if more than one record matches the Key_Value. "F" = First "L" = Last "C" = Closest match Closest match uses the first occurrence of the closest inexact match if an exact match does not exist, otherwise it uses the first occurrence of an exact match.
The value of a key to search for. The type of Key_Value must be the same as the type of the keys in the index specified by Index_Name. Any type
The name of a field in the Lookup_Table or a valid expression which may contain one or more fields.
The fully qualified name of a table. If you omit the drive and path, Alpha Anywhere searches the directory of the current database.
The name of an index in the index lookup table that may contain the Key_Value.
Returns the value of a date expression in an external table.
LOOKUPD() searches an external lookup table ( Lookup_Table ) for an indexed record matching the Key_Value, and returns the date value in Lookup_Expression from the matching record. Alpha Anywhere performs an indexed search of the Lookup_Table using the Index_Name index. Note : If a record with a matching Key_Value is not found, Alpha Anywhere returns a blank value.
Assume that the Invoice and Customer tables contain the following records and that the index, CUSTOMER_ID, exists on the CUST_ID field in Customer : If the following expression defines a calculated field or global variable for the Customer table, Alpha Anywhere returns the date of the last invoice record that matches the current Customer record:
CUST_ID and INV_DATE
lookupd("L", CUST_ID, "INV_DATE", "C:\DATABASES\INVOICE.DBF", "CUSTOMER_ID") -> 03/15/1993, if the current customer record is C001
The Customer identification field ( CUST_ID ) exists in both tables. In the above expression, CUST_ID is the field from the Customer table field and CUSTOMER_ID is the name of an index on the CUST_ID field from the INVOICE table. Note : You can use TABLE.FILENAME_GET()to get the fully qualified name of a table.