# dblookup

### dblookup(connector, tableName, searchFieldName, returnFieldName, lookupVal, dataType, dispMessages)

Performs a lookup in a database. This can be using the source or target connector.

NOT GoldMine.

## Arguments

Argument | Data Type | Description
connector | string | The Connector to use to perform the lookup in. 'T' for the target connector and 'S' for the source connector.
tablename | string | Table in connector to lookup returnFieldName.
searchFieldName | string | Field used to identify the record that contains returnFieldName.
returnFieldName | string | Field desired.
lookupVal | string | Value that searchFieldName must equal to get returnFieldName.
dataType | string | Optional, this defines the data type of searchFieldName. Use 1 to indicate a string anything else to denote a non string.
dispMessage | boolean | Optional, tells to display a message if there is a return value or not.

## Returns

The value held the returnFieldName.

## Description

Performs a lookup in the specified connector. Will return the value specified field based on a specified field equalling a specified value.

## Examples

Example | Description
dblookup("T", "testTable", "Name", "ID", "12345", 1, false) | Will return the value in the ID field where the value in the name field equals '12345'. It will use the target connector and look in the table 'testTable'.