lookupmoredata(
DATAFIELD
,
DEFAULT
)

The lookupmoredata( function looks up an additional data field based on the previous lookup.


Parameters

This function has two parameters:

datafield – is the name of the field that you want to retrieve data from. For example if you want to retrieve check numbers, this should be the name of the field that contains check numbers. This must be a field in the database specified by a previous lookup function.

default – is the value you want this function to return if the previous lookup formula failed to find a match. The data type of the default value should match the data type of the dataField parameter. If the dataField is numeric, the default should usually be zero. If the dataField is text, the default should usually be "". Note: This parameter is optional. If it is omitted, the lookupmoredata( function will return an error if the search fails.


Description

This function is designed to retrieve additional information after a lookup function. In this example, the procedure looks up the address from a Mailing List database and copies it into the Street field in the current database. It then retrieves the City, State and ZipCode fields from the same record located by the lookup( function.

Street = lookup("Mailing List","Name",Name,"Address")
City = lookupmoredata("City")
State = lookupmoredata("State")
Zip = lookupmoredata("ZipCode")

The lookupmoredata( function works with any lookup function, including lookup(, lookuplast(, lookupselected(, lookuplastselected(, and superlookup(. (It does not, however, work with the table( function.)


Error Messages

lookupmoredata( function failed because previous lookup failed. – This function should only be used immediately after a lookup function.


See Also


History

VersionStatusNotes
10.0NewNew in this version.