cancel
Showing results for 
Search instead for 
Did you mean: 

Add destination contexts for multiple source fields

Former Member
0 Kudos

Hi,

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 ?

Cheers

Colin.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Colin,

A small advanced UDF will help you solve the issue easily.

The UDF will take 2 inputs.

a. HouseNumber

b. FlatNumber

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.

Regards,

Jai Shankar

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Colin,

As per my understanding of the problem, the solution for this as -- Write an UDF and give HouseNumber & FlatNumber as input to UDF, and return those vales and map the output of udf to target.If both input fields are having the values your AddressLine will populates with the both values.If you may face the context problem then insert an Context in udf itself. Correct me if i understand wrongly ..:)

Cheers

Veera

prabhu_s2
Active Contributor
0 Kudos

content deleted for incorrect post.....

Former Member
0 Kudos

HI,

Is your target node "address" will generated two times.

Thanks and Regards,

Chirag Gohil