Mapping error

i am getting the following error when mapping an element in a document list to a target element :

ISC.0049.9019 - more than one copy into the path with different common parent(s).

can someone help?

thanks,
mow

This means that you’ve mapped a field that is inside a document/record/string list structure, and another that is in a different structure. For example:

YourDocName
–>DocListA
----->Field 1
–>DocListB
----->Field 2

If you map both field 1 and field 2 in the same map step, you’ll get this error. There are various other ways to get the error, but as far as I know all of them include mapping more than one field under a list element somewhere.

The best solution is to map lists inside loop steps, so that you never have lists in your document structure. You can also do the maps within different map steps, but be aware that you may get some strange results depending on what your document structure looks like.

thanks,much ! if a map step is done inside a loop,how can one find out the current array index?

mow

Hi mow,

Right click on Field 1 and copy that field and paste it in the in-array of loop Properties. That way it points to the array index.

thanks lavanya. Actually field 1 and field 2 appear in different iterations of the document array that contains it. so in Doc[0], field 1 may be not be there and only available in Doc[3]. there is a type attribute on the document which indicates what structure it will assume. when i check the type attribute for a ceratin condition and if it comes true, i have to map field 1 in that iteration of the document to a destination format.

please guide.
thanks,
mow

Hi Mow,
Actually I am not able to completely understand your question. Let me give you an example with what I have understood from your question: Say you have a document list “List1”, then what you would do is Loop over List1…that is right click on List1 ,copy and paste it in the in-array of your loop properties. Then inside the loop,put a branch and in the branch properties…in the switch put $iteration…basically it means u r branching on the iteration. Now inside the branch you put a map and in the properties give the label as 1. It means you are mapping for the first iteration. Now go to the pipeline tab of your map and map List1 to the corresponding variable and drop List1.Similarly put another map below and give label 2 and map List1 to the corresponding variable and drop List1. Hope this helps.
Thanks,
Lavanya

here is a better description of my problem.

doc1 is an array
field1
field2
doc A type=“type1”
field 3
doc A type=“type2”
field 4

In the above, field 3 will appear whenever doc A type = “type1” and filed 4 will only appear if type=“type2”

how can i loop over doc A and map either field 3 or field 4 to two destination elements.

thanks,
mow

Hi mow,

 in your posting you mentioned docA type ="type1" is this type 

is attribute?if it is attribute then Is doc represents “@ type” symbol.
then 1st loop over doc1.Then take branch on doc1/docA/@type.Take
2 sequences under branch.1 st sequence label set as type1,2nd one
set as type2.Inside 1st sequence take map do process.Similarly 2nd
one also.After exiting loop clean unnecessary things.

–sriniK

Within your loop of ‘doc1’, you’ll want to insert a BRANCH operation, and set the ‘evaluate labels’ to ‘true’. Under the branch, add SEQUENCE elements for each of the 2 conditions. Set the label for the first SEQUENCE to the field name for ‘field 3’… what this means is ‘execute this sequence if ‘field 3’ exists’ (in other words, this record is of type1). Under this sequence, insert a MAP instruction and map ‘field 3’ to ‘field 1’. For the second SEQUENCE set the label to the field name of ‘field 4’. Under this sequence, map ‘field 4’ to ‘field 1’.

the only thing i am confused of is how do i code the first sequence and the second sequence. i just have docA in my structure without the child elements so how can i map these fields when they are not visible in the design view.

thanks,
mow

You can either manually add the fields during the map instruction, or before entering the loop, you can define the array type to be a ‘list of record references’, and define a hybrid record that contains fields from both type1 and type2.

thank you all for your help on this.

mow