PopulateValue

Syntax

PopulateValue (mapName, referenceElementName, referenceValue, elementName, elementValue, mode)

Description

Locate a reference element value in a cross-reference map and populate another element in the same data row with an equivalent value. This form of populate is used to find a single reference element and populate 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 in which to supply an equivalent value, as string.

elementValue

The equivalent value to be supplied to the element, as string.

mode

The mode in which the function populates the element. You can specify any of the following values: ADD, LINK, or UPDATE. The mode parameter values are case-sensitive and must be specified in uppercase only.

Returns

The UniqueGUID value of the Xref row where the data was populated.

Example

This example will locate value &guid1 in the UniqueGUID element of the &TestName cross-reference map, and update the equivalent value of element EBS1 to &value1:

 &value1 = &value1 | "0";
  &returnValue = &xref.PopulateValue(&TestName, &UniqueGUID, &guid1, &EBS1,⇒
 &value1, &UPDATE);

This example will add values &guid3 in the UniqueGUID element and &value3 in the EBS1 element to the &TestName cross-reference map data:

Local string &guid3 = UuidGen();
Local string &value3 = "00003";
&returnValue = &xref.PopulateValue(&TestName, &EBS1, &value3, &UniqueGUID, &guid3,⇒
 &ADD);

This example will add value &value4 in the EBS1 element to the &TestName cross-reference map data, and let the code generate a random UniqueGUID:

 Local string &value4 = "00004";
 &returnValue = &xref.PopulateValue(&TestName, &EBS1, &value4, &UniqueGUID, "",⇒
 &ADD);