cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue 2

Former Member
0 Kudos

guys,

is it possible to map 2 source fields' values to one target field?

example:

- node A (occurence 0..n)

- - noda B1 (values(1,2,3)) (occ 1 - values dependent on node A)

- - node B2 (values(4,5,6))

to target

- node X

- - node Y (values(1,2,3,4,5,6))

thanx 4 answs

o.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

oooops, I wrote it not properly...sorry... once again

source doc:

- nodeA (occ 0..n)

- - node B1 (value(1)) (occ 1)

- - node B2 (value(4)) (occ 1)

- nodeA

- - node B1 (value(2))

- - node B2 (value(5))

target

- nodeX (occ 1)

- - nodeY (value(1)) (occ 0..n)

- - nodeY (value(2))

- - nodeY (value(4))

- - nodeY (value(5))

concat worx on strings, no nodes.. i need to "join" values of 2 different source nodes and map their values to 1 target field (but separate values)

O.

Former Member
0 Kudos

You'll have to make a user defined function where you place all the source values in a single queue and connecting the result of that queue to the target field. Be sure to remove any context changes in that queue!

Former Member
0 Kudos

hey this code will work for u

<b> int len = a.length;

int l2 = b.length;

for(int i=0;i<len;i++)

result.addValue(a<i>);

for(int i=0;i<l2;i++)

result.addValue(b<i>);</b>

where A and B are two input source( in your case bode B1 and B2)

output will be single queue with combined source value(1,2,3,4)

Remove context before maping it to taregt field

Pls. rewards points

Regards.

Anu

former_member192892
Active Contributor
0 Kudos

Hi Olian..

Right click on target node nodeY and select duplicate subtree

and now, do this

http://www.flickr.com/photos/12281969@N07/1371241971/

and do the same for nodeB2 to the second duplicate nodeY

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Olian,

You can use two standard concat funtions with inputs as B1 and ',' to one concat funtion its resultant and B2 to other concat funtion output assigned to Y.

Regards,

Sreenivas

Former Member
0 Kudos

Hi,

Use concatenate functionality present in graphical mapping tool...

Anu SInghal,

<b>Kindly rewards points if useful</b>