cancel
Showing results for 
Search instead for 
Did you mean: 

counter function value to multiple elements as same value in different node

Former Member
0 Kudos

I need your help!

I have a counter function and value of that needs to be passed to two elements of Node A and Sub Node B..

Ex: Mapping

Map Counter function to NodeA.Element1 and also to NodeB(subnode).Element2

Expected Result:

NodA.Element1 = 1

NodeB.Element2 =1

but I am getting the result as

NodA.Element1 = 1

NodeB.Element2 =2

I understand the reason.. since the counter function is called each time..

so my questions is how do I the expected result as mentioned--

NodA.Element1 = 1

NodeB.Element2 =1

remember the XML is multiple occurence(1.. unbounded for both the nodes)

Thanks-Gopal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

for each node , you have to create seperate counters.

Former Member
0 Kudos

I think I did not explain phrase it correctly..Technicallyh NodeA.Element1 value should be copied to NodeB.Element2..As long as I can generate counter to NodeA.Element1 and hold the value somewhere to copy to NodeB.Element2, that would be fine..

the above suggestion you guys made would not work as it will create two different set of sequences.. however Index suggestion might work differently but still I might go out of sequence if I have multiple detail record for each master record..

Here the expected output (concise)

Record 1 - NodeA.Element1 = 1

Record 2 -NodeB.Element2=1

Record3- NodeA.Element1 =2

Record4 - NodeB.Element2=2 -->two detail records

Record5 - NodeB.Element2=2 --> two detail records

please help

Former Member
0 Kudos

> Record 1 - NodeA.Element1 = 1

> Record 2 -NodeB.Element2=1

>

> Record3- NodeA.Element1 =2

> Record4 - NodeB.Element2=2 ; -->two detail records

> Record5 - NodeB.Element2=2 ; --> two detail records

Can you plz provide the xml structure of above output.

Former Member
0 Kudos

Hi,

Instead of count use index function and select the option to reset index after each context change..

this will suffice your requirement..

HTH

Rajesh

Former Member
0 Kudos

Hi,

Can u please use the same mapping for NodeB.Element2 as u r doing for the NodA.Element1.

So that u will have 2 counters running simultaneously but have same value...

Babu