DriveWorks Solo 15: DWVLookup [send feedback...]

Syntax

DWVLOOKUP( [ Lookup], [ In], [ LookupColumn], [ ReturnColumn], [ MatchType] )

Searches a table for a specific value in a specified column and returns a value from the same row..

Lookup is the value to be found.

In is the table within which the Lookup value is to be found.

LookupColumn is the number of the column containing the data to be searched for.

ReturnColumn is the number of the column containing the data to be returned.

MatchType defines whether the match has to be exact or the nearest found.

Examples

Rule

Meaning
DWVLOOKUP(CarColourComboBoxReturn, Vehicles, 3, 2, FALSE)The function looks in the Vehicles table for a match, in the third column of the table, to the value returned from the CarColourComboBox. If a match is found, the function then looks across to the second column and returns the value in the same row as the match found. The user has also specified that the match needs to be exact (denoted by the FALSE term). In this case, the Car Colour selected in the combo box is "Blue", so the function returns "Golf".

Example Outcomes

Lookup

In

LookupColumn

ReturnColumn

MatchType

Outcome

"Blue"Vehicles32Exact"Golf"
"White"Vehicles31Exact"Renault"
26People32Nearest"Dave Sharp"
42People34ExactFemale

Example Data

Vehicles Table

MakeModelColour
VolkswagenGolfBlue
FordEscortRed
RenaultKangooWhite
Mazda2Black

People Table

Member IDNameAgeGender
42Dave Sharp25Male
44Joe Bloggs37Male
96Sandra Shield42Female
107Thomas Knight21Male
251Isabelle Jones56Female

Table of Contents