DBLOOKUPDEFAULT2

Description

Similar to the DBLOOKUP2 function, except that it accepts a default_value to return if no matching record is found.

Syntax

DBLOOUPDEFAULT2 ( SourceField1, SourceField2, "connection", "table", "lookup_field1", "lookup_field2", "substitution_field", "default_value" )

Parameter Description
SourceField1 The value for which to search in the lookup_field1 column.
SourceField2 The value for which to search in the lookup_field2 column.
connection The connection where this lookup table resides.

If the connection is Scribe Internal Database, the SCRIBE user must have at least SELECT privileges on the lookup table.
table The name of the lookup table.
lookup_field1 The name of the column in the lookup table that stores the first value to search for.
lookup_field2 The name of the column in the lookup table that stores the second value to search for.
substitution_field The name of the column in the lookup table that stores the value to return.
default_value Default value to return if the lookup does not return a value

Remarks

Note: This function requires special handling when working with bulk operations. See Using Bulk Operations for more information.

Use this function to avoid wrapping the DBLOOKUP2 function in ISERROR when a default value is needed.

See also

DBLOOKUP2

DBLOOKUPDEFAULT