xref:populateXRefRow
Syntax
xref:populateXRefRow(mapName, referenceElementName, referenceValue, elementName, elementValue, mode)
Description
Use the populateXRefRow function to populate a cross-reference element with a value.
Parameters
| Parameter | Description |
|---|---|
|
mapName |
The name of the cross-reference map, as string. |
|
referenceElementName |
The name of the reference element, as string. |
|
referenceValue |
The value corresponding to the reference element name, as string. |
|
elementName |
The name of the element to be populated, as string. |
|
elementValue |
The value with which to populate 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 the uppercase only. |
Returns
This function returns the cross-reference value being populated as a string.
This table lists the results for the Xref:populateXRefRow function.
| Mode | Reference Value | Value to Be Added | Result |
|---|---|---|---|
|
ADD |
Absent Present Present |
Absent Absent Present |
Success Exception Exception |
|
LINK |
Absent Present Present |
Absent Absent Present |
Exception Success Exception |
|
UPDATE |
Absent Present Present |
Absent Absent Present |
Exception Exception Success |
Example
This table lists examples of the modes with their descriptions and exception reasons:
| Mode | Description | Exception Reasons |
|---|---|---|
|
ADD |
Adds the reference value and the value. For example:
adds the reference value PS101 in the PS element and the value CM001 in the Common element of the customers cross-reference map. |
Exceptions can occur for the following reasons:
|
|
LINK |
Adds the cross-reference value corresponding to the existing reference value. For example:
adds the value SB-101 in the SBL element of the customers cross-reference map and links it to the value CM001 in the Common element. |
Exceptions can occur for the following reasons:
|
|
UPDATE |
Updates the cross-reference value corresponding to an existing reference element-value pair. For example:
updates the value PS100 in the PS element of the customers cross-reference map to value PS1001. |
Exceptions can occur for the following reasons:
|