cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical Mapping error

Former Member
0 Kudos

Hi All,

Could you please suggest me the solution?

My mapping is like is:

Condition1.

If (Child1 == Field1) and Field2==1 then Value should be mapped to targetVal1 at the target side.

Condition2.

If (Child1 == Field1) and Field2==2 then Value should be mapped to targetVal2 at the target side.

Condition3.

If (Child1 == Field1) and Field2==3 then Value should be mapped to targetVal3 at the target side.

Source structure

Header 0...unbound

Child1 0...1

Child2 0...unbound

Field1 0...1

Field2 0...1

Child 3 0...unbound

Value 0...1

Target Structure:

Target

targetVal1

targetVal2

targetVal3

All the fields in the source structure are in Header context.

If all conditions are satisfied, targetVal1, targetVal2 and targetVal3 will be populated at the target side.

Problem is:

In absences of Field 1 and Field 2 fields in the above structure and Child 3 segment exits, the Value is populating when the condition 1 is true.

For Example:

For this case I should get the value as u201CTwou201D in my target field but I am getting as u201COneu201D which is wrong. <Header>

< Child1>ABC </Child1>

< /Child2>

<Child3>

<Value>One</Value>

</Child3>

</Child2>

< Child2>

<Field1>ABC</Field1>

<Field2>1</Field1>

<Child3>

<Value>Two</Value>

</Child3>

</Child2>

</Child1>

Can someone help me out please?

Regards,

Praveen Kumar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

It will be the context problem.

Change the target values occurances 0-unbounded.

Map like below.

Child1equalS(TextFunction)

Field1 and(Boolean)IfwithoutElse(then)mapValue---Target

Field2equalS(TextFunction)

Constant(1 or 2 or 3)

Child1contextHeader

Field1contextParentOf Header

Field2contextParentOf Header

ValuecontextParentOf Header

Hope it will solve your problem.

Regards,

Prakasu

Former Member
0 Kudos

hi

try to like this

child1-->your present logic->RemoveContext->spiltbyValue->targetfiled.

Former Member
0 Kudos

Hi,

Try by using SplitByValue(each value) and Collapse Context after each input field like,

child1>SpliByValue>CollapseContext-->your present logic.

do it for each input field from source structure.

Regards,

Rohit.

Former Member
0 Kudos

hey praveen,

As per your logic the value that is returning is correct...

see

If (Child1 == Field1) and Field2==1 then Value should be mapped to targetVal1 at the target side.

in ur input Child1==Field1 (i.e. ABC==ABC) and Field2=1 then it will give the first value from the Value field.

Former Member
0 Kudos

value field shdn't be with header context...change it to child context...

Former Member
0 Kudos

Hi Chirumamilla Sukarna,

We have tried with changing the context to child but no use of this and we are getting same values.

Please suggest some other solution.

Regards,

Praveen Kumar