xref:populateXrefRowNVP

Syntax

xref:populateXRefRowNVP(mapName, referenceDomain, referenceNVP, targetDomain, targetNVP, mode)

Description

Use the xref:populateXrefRowNVP function to populate multiple elements in the cross-reference map with values.

Parameters

Parameter Description

mapName

The name of the cross-reference map, as string.

referenceDomain

The name of the reference domain, as string.

rreferencesNVP

NVP list of reference elements and values, as string.

targetDomain

The name of the domain to be populated, as string.

targetNVP

NVP list of elements and values to be populated in the elements, 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 table lists the results for the populateXrefRowNVP 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 the modes with their descriptions and exception reasons:

Mode Description Exception Reasons

ADD

Adds the reference value and the value to be added. For example:

xref:populateXRefRowNVP("Items", 
"PeopleSoft", "<Setid>SHARE</Setid> 
<ItemID>1005</ItemID>","Common", 
"<Common>” | generate-guid() | 
”</Common>","ADD")

adds the reference values SHARE/1005 in the PeopleSoft domain and the value <guid1> in the Common domain.

Exceptions can occur for the following reasons:

  • The specified cross-reference map is not found.

  • The specified domains are not found.

  • The specified elements are not found.

  • The values provided are empty.

  • The values being added are not unique across that domain for that map.

  • The element for that row already contains a value.

  • The reference value exists.

LINK

Adds the cross-reference value corresponding to the existing reference value. For example:

xref:populateXRefRowNVP("Items", 
"PeopleSoft","<Setid>SHARE</Setid> 
<ItemID>1005</ItemID>","Retail", 
"<Product>RP0005</Product>","LINK")

adds value RP005 to the Retail domain and links it to reference values SHARE/1005 in the PeopleSoft domain.

Exceptions can occur due for following reasons:

  • The specified cross-reference map is not found.

  • The specified domains are not found.

  • The specified elements are not found.

  • The values provided are empty.

  • The reference value is not found.

  • The value being linked exists in that domain for that map.

UPDATE

Updates the cross-reference value corresponding to an existing reference element-value pair. For example:

xref:populateXRefRowNVP("Items", 
"PeopleSoft","<Setid>SHARE</Setid> 
<ItemID>1000</ItemID>","PeopleSoft", 
"<Setid>SHARE</Setid> 
<ItemID>10000</ItemID>","UPDATE")

updates the value 1000 in the ItemID element of the PeopleSoft domain to value 10000.

Exceptions can occur for the following reasons:

  • The specified cross-reference map is not found.

  • The specified domains are not found.

  • The specified elements are not found.

  • The values provided are empty.

  • The values being updated are not unique across that domain for that map.

  • Multiple values are found for the domain being updated.

  • The reference value is not found.

  • The element for that row does not have a value.