LookupValueNVP

Syntax

LookupValueNVP (mapName, referenceDomain, referenceNVP, targetDomain, defaultNVP, needAnException

Description

Locate the reference domain element values in a DVM, and return 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

Name of a static value map definition (DVM), as string.

referenceDomain

Name of a domain in the DVM in which to look for a value, as string.

referenceNVP

Name value pairs of elements and values in the DVM domain to look for, as an array of DataElement.

targetDomain

Name of the domain to return equivalent values for, as string.

defaultNVP

Default values (NVPs) to be returned if needAnException is false and an error occurs, as an array of DataElement.

needAnException

True to return error messages, false to return an NVP with the default values.

Returns

An array of DataElement. Name value pairs containing the equivalent values for the elements in the target domain, or the default values.

Example

This example is used to look up value &guid1 in the UniqueGUID domain of the &TestName DVM and return the equivalent values for the &RTK domain:

Local array of EOTF_CORE:Common:DataElement &UniqueGUIDrequestValues = CreateArray⇒
(create EOTF_CORE:Common:DataElement(&UniqueGUID));

&UniqueGUIDrequestValues [1].value = &guid1;
Local array of EOTF_CORE:Common:DataElement &returnValue = &dvm.LookupValueNVP⇒
(&TestName, &UniqueGUID, &UniqueGUIDrequestValues, &RTK, &DefaultRTKValues,⇒
 True);