dvm:lookupValueNVP

Syntax

dvm:lookupValueNVP(mapName, referenceDomain, referenceNVP, targetDomain, defaultNVP, needAnException)

Description

The dvm:lookupValueNVP function finds the reference domain element values in a DVM and returns the equivalent values of all elements in the specified domain as an NVP list. This form of DVM lookup should be used when multiple elements exist in either the reference or return domain. All required elements in the reference domain must be included in the reference NVP list, but optional elements (qualifiers perhaps) do not have to be included. The return string will include values for all elements in the target domain as an NVP list regardless of whether they are required.

Parameters

Parameter Description

mapName

The domain value map name, as string.

referenceDomain

The source domain name, as string.

referenceNVP

NVP list of source elements and values, as string.

targetDomain

The target domain name, as string.

defaultNVP

If the value is not found, then the default values specified are returned, as string.

needAnException

Specify true or false.

Returns

The return string will include values for all elements in the target domain as an NVP list regardless of whether they are required.

An exception can occur for one of the following reasons:

  • The DVM map with the given name is not found.

  • The specified domains are not found.

  • The specified elements are not found.

  • The specified source values are empty.

Example

The following code looks up the specified values of the BusinessUnit and Chartfield elements in the PeopleSoft domain of the ChartElements DVM and returns the value of the UniqueGUID element:

dvm:lookupValueNVP("ChartElements","PeopleSoft","<BusinessUnit>US100</Business⇒
Unit><Chartfield>ACCOUNT</Chartfield>","UniqueGUID","<UniqueGUID>CouldNotBeFound⇒
</UniqueGUID>",True)