I’ve repeated on the iSummary and I’m getting 2 detail records which are fine, but the iVatSummary line could be multiple, so I’ve put another repeat in but it’s putting both of the VAT Summary lines into the same group.
I want the iVATSummary to be linked to each iSummary line, so in the above instance each should just have 1 detail line. Any ideas on how I achieve this?
Can you also please share an screenshot of the properties of the Extraction1 and Extration2 Extract Steps? I assume that you need to update the properties of one these two Extract Steps.
Sorry someone rebooted the server and I’ve lost everything so I’ve started again but I can’t get anything in the VATSummaryLine now. Do I need the goto here? Screen shots below of various steps
I think your issue is with the various Xpath statements you are using within each loop.
Remember that when you loop, for instance on <element>, then extracting the <subelement> child nodes from that element is done through ./subelement, where the dot refers to the current element (in a loop, this changes to the next <element> with each iteration.
Attached is a sample config NestedElements.OL-datamapper (9.3 KB) that iterates through all <invoice> elements and for each, extracts <item> child elements. Perhaps you can use it as inspiration for your own configuration.
@Phil thanks for that. I’ve had a look and made some changes but it’s still not working. It’s nothing to do with the fact that there are some nested elements before the main element start’s is it, because if I don’t add the goto then the repeat doesn’t work?
I’ve also noticed that in the first loop I have to put …/iSummary rather than ./iSummary otherwise the first repeat doesn’t work?