VALUEMAPLOOKUPB

Description

Looks up a source value and returns the corresponding target cross-reference value. Similar to the DBLOOKUP function, except that VALUEMAPLOOKUP is based on the VALUEMAP table in the Scribe Internal database, allowing many-to-one relationships to be expressed.

To express many-to-one relationships in VALUEMAP, set the PRECEDENCE field for each cross reference. The cross reference with the lowest precedence will be returned. This function returns the value from the APP_B_VALUE field.

Syntax

VALUEMAPLOOKUPB ( map_label, APP_A_VALUE, default_value )

Parameter Description
map_label Search rows that contain this value in the Map_Label field. (This is the source value.)
APP_A_VALUE The value in this field will be returned.
default_value Default value to return if the lookup does not find the source value.

Remarks

To express many-to-one relationships in VALUEMAP, set the PRECEDENCE field for each cross reference; the cross reference with the lowest precedence will be returned.

Examples

The following example looks at rows containing "Private" in the MAP_LABEL field and returns the value in the App_A Value field. If the source value cannot be found, the default value "Public" is returned.

VALUEMAPLOOKUPB( "Private", APP_A_VALUE, "Private" )

All rows with "Private" in the Map_Label field are searched. The corresponding APP_B_VALUE field value with the lowest precedence is returned.

See also

VALUEMAPLOOKUPA

DBLOOKUP