The TSLookup function returns a value from a specific field on a specific record in a Sage 300 CRE Office database.
The TSLookup function syntax has these parts:
TSLookup( table name , field name , [key1 ] , [ ... keyn ] )
|table name||Required. This argument identifies a specific internal table name in the Sage 300 CRE Office database.|
|field name||Required. This argument identifies a specific internal field name. The field name must identify a valid field for the table identified by the table name argument.|
|key 1 ... key n||Optional. These arguments provide the values of the primary key for the specific record desired. The number of key values and their meaning will depend on the table that was identified by the table name argument.|
To identify a specific record in the database, you must supply a value for each of its key fields. If too few key values are supplied, the first record in the table matching the key fields that were supplied will be used. If too many key values are supplied, then the extra key values will be ignored.
If there is no record in the table with key fields matching the supplied values, the function will not return a value. In this case Excel may display a value such as zero or a date, depending on the cell format.
Click here for examples.