cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi All,

I have a mapping issue. Please see below:

When Code is equal to 1 it has to take Name1 and Surname1 and place it in field <D> and <C>. The problem is it takes the blabla fields and puts them into my output structure. Somehow the order gets mixed.

Input Structure

<AdditionalInfo> (0-unbounded)

<Code>A</Code>

</AdditionalInfo>

<AdditionalInfo>

<Code>B</Code>

</AdditionalInfo>

<AdditionalInfo>

<Address>

<Name>Name1</Name>

<Surname>Surname1</Surname>

</Address>

<Code>1</Code>

</AdditionalInfo>

<AdditionalInfo>

<Address>

<Name>blabla</Name>

<Surname>blabla</Surname>

</Address>

<Code>2</Code>

</AdditionalInfo>

Output Structure

<Field>

<D>Name1</D>

<C>Surname1</C>

</Field>

Solution I tried:

Code - removeContext -

Constant=1 - equalS - if without else - <D>

Name (mapped to then of if case) - removeContext -

Can anyone help.

thanks.

Edited by: Chris027 on Mar 17, 2011 11:01 AM

Edited by: Chris027 on Mar 17, 2011 11:18 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

your logic seems correct...

it should be like if (code with context to super parent) equals constant(1) then (Name with context to super parent) to target field...

cross check once by using queue option to check what values are passed at runtime...

HTH

Rajesh

RKothari
Contributor
0 Kudos

Try using mapwithDefault function after the Name field.

Check the queue values in mapping at IfthenElse and removeContext function.