LookupValue
Syntax
LookupValue (mapName, referenceElementName, referenceValue, elementName, needAnException)
Description
Locate the reference element value in a cross-reference value map, and return the equivalent value for the specified element name. This form of lookup is used to find a single reference element and return a single element value.
Parameters
| Parameter | Description |
|---|---|
|
mapName |
Name of a dynamic (cross-reference) value map definition, as string. |
|
referenceElementName |
Name of an element in the Xref in which to look for a value, as string. |
|
referenceValue |
Value of an element in the Xref to look for, as string. |
|
elementName |
Name of the element in the Xref for which to return equivalent values, as string. |
|
needAnException |
True to return error messages, false to return blank. |
Returns
An array of string containing the equivalent values of elementName in the Xref.
Example
This example will look up value &guid1 in the UniqueGUID element of the &TestName cross-reference map and return the equivalent value of element &EBS1:
Local string &returnValue = &xref.LookupValue(&TestName, &UniqueGUID, &guid1,⇒
&EBS1, True);
This example will look up a value that does not exist in element &EBS1 of the &TestName cross-reference map to verify that the default value (blank) is returned when the NeedAnException parameter is false:
&returnValue = &xref.LookupValue(&TestName, &EBS1, "NotFound", &UniqueGUID, False);