Add destination contexts for multiple source fields
I have an issue with graphical mapping as outlined below:
1. Target field <AddressLine> is defined as 2....5 (from WSDL so cannot be changed)
2. If source field <HouseNumber> is set, an occurance of <AddressLine> needs to be added
3. If source field <FlatNumber> is set, another occurance of <AddressLine> needed to be added
So in this scenario I would end up with 2 occurances of <AddressLine>.
Can anyone advise how to achieve this ? I am thinking a small UDF is needed by not sure whewre to start ?
JaiShankar Ramakrishnan replied
A small advanced UDF will help you solve the issue easily.
The UDF will take 2 inputs.
With inthe UDF, use a for loop and get the content of House Number, for each house number add a constant say "h" to the result list object.
Then have another loop that loops over Flat number. For each flat number add a constant say "f" to the result list.
You are done. Map the UDF result to AddressLine.