Merging Input from Multiple Sources
You may have multiple items in the Scope Variables that you wish to map to one repeating element in the Function panel.
For example, you may have multiple formats for customer records and you wish to create a single, merged mailing list containing all customers in one format.
- Procedure
- Select the repeating element in the Function panel, right-click, and select
Because you are creating two different formulas for mapping, you need two copies of the repeating element, one for each format. The resulting output contains only one repeating customer element, but the two copies in the Function panel make it simpler to perform two different mappings.
from the menu.
- Map one of the elements from the Scope Variables to the first copy of the repeating element in the Function. For example, map
$Retrieve-Customer-Type1/Customer
toMergeMailingList/CustomerList/Customer
. - Map the other element from the Scope Variables to the second copy of the repeating element in the Function. For example, map
$Retrieve-Customer-Type2/Record
toMergeMailingList/CustomerList/Customer
. - Select the
Address
element and click the XPath Formula Builder icon in the Input tab toolbar. In the XPath Formula Builder, drag aconcat()
function into the XPath Formula field. This function is used to concatenate the three elements in theRecord
element in the Scope Variables area to oneAddress
element in the function’s input.Click the Data tab, then drag the
$current()/Address/street
element into the<<
string1>>
placeholder in theconcat()
function.Drag the
$current()/Address/state
element into the<<
string2>>
placeholder in theconcat()
function. Then, add a comma to the end of the function to include a third string to concatenate. Drag the$current()/Address/zip
element into the position of the third string in theconcat()
function. - Click Apply, then click Close to dismiss the XPath Formula Builder dialog.
- This results in the following mapping: