DriveWorks Pro 15: HLookup [send feedback...]

HLookup

Returns a value from a table corresponding to a match found in the first row.

Syntax

HLOOKUP( [ Value], [ TableName], [ RowIndex], [ MatchType] )

Value is the value to be found.

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

RowIndex is the number of the row containing the data to be returned.

MatchType defines whether the match has to be exact (False) or the nearest found (True).

Examples

Rule

Meaning
HLOOKUP(CarMakeComboBoxReturn, Vehicles, 2, FALSE)The function looks in the Vehicles table for a match, in the first row of the table, to the value returned from the CarMakeComboBox. If a match is found, the function then looks down 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 Make selected in the combo box is "Volkswagen", so the function returns "Golf".

Example Outcomes

Value

TableName

RowIndex

MatchType

Outcome

"Volkswagen"Vehicles2False (Exact)"Golf"
"Mazda"Vehicles3False (Exact)"Black"
43People2True (Nearest)"Dave Sharp"
251People3False (Exact)56

Example Data

Vehicles Table

MakeVolkswagenFordRenaultMazda
ModelGolfEscortKangoo2
ColourBlueRedWhiteBlack

People Table

Member ID424496107251
NameDave SharpJoe BloggsSandra ShieldThomas KnightIsabelle Jones
Age2537422156
GenderMaleMaleFemaleMaleFemale

Table of Contents