Description
Similar to the DBLOOKUP function, except that it accepts a default_value to return if no matching record is found.
Syntax
DBLOOKUPDEFAULT ( TextSourceField, "connection", "table", "lookup_field", "substitution_field", "default_value" )
Parameter | Description |
---|---|
TextSourceField | The value for which to search in the lookup_field 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_field | The name of the column in the lookup table that stores the 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 DBLOOKUP function in ISERROR when a default value is needed.
For an example, see DBLOOKUP.
See also