contents.gifindex.gifprev1.gifnext1.gif

rt_Lookup

Purpose

Returns a field value from a table in the context of a particular carrier.

Arguments

rt_Lookup(

<table name>

, <row select> // See notes.

, <col name> // The column name.

)

Notes

The value is returned in an annotated string:

"<table name>[<row select><sep><col name><sep><value>]"

Where <sep> is an internal rules-engine marker (Chr$(149) ).

<table name> is resolved in the context of the current value of VEND_LABL.

<table name> parameter has been modified so that either a Table_Name Table_Name:Index_Name can be used. Index_Name is optional. If it is not given (as has been true to this point), then PrimaryKey is assumed. In addition, this function can be passed fewer keys in the <row select> parameter than are contained in the index being used. If fewer keys are provided, then a Find_First where the provided keys are equal is performed. For example, the first two keys of a three key index could be used. For Collection_Create (and Driver), the resulting collection will be populated based on all records which match the supplied keys (as was previously the case).

This function can limit its search one of several ways, keeping in mind that Lookup routines find a single record (the first match), while Collection routines find all which match the request:

1. A simple value . . . which implies a single key search.

2. A list of values, such as [v1] [v2] [v3] which implies a multi-key search even though the index may have more keys.

3. An SQL where clause using SELF! [ ] references.

4. A list of values (as in option 2) followed by AND then an SQL where clause. For example: [v1] [v2] AND SELF![MyFld] = v3’”