It looks like there can be multiple inbound NTE segments.
Is that true?
Does the segment you needed added always go at the end of how many NTEs there are?
Is the added NTE to always have the content you show?
If the answers to the above are all true then you can ITERATE through the inbound keeping track of the ITERATE counter value (you can use your own counter – let’s say %s99 if it is a segment repetition ).
When the ITERATE is through add one to your counter using the MATH Action and then COPY the data to each outbound field using your counter in the address path where the ITERATE counter normally goes.
If you need additional understanding regarding using your own counters (there is a ‘trick’ to that) either search the forum (it has been discussed multiple times) or email me and we can get you going off-line.
This is most likely very doable in the Xlate without Tcl involvement.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
OK if there is only one NTE ALL the time then you do not need to do an ITERATE. But make sure that you will only ever receive one NTE because if you later discover you can receive more you will need an ITERATE and might as well do that work now.
With only one NTE, COPY your first NTE with the default zero on the appropriate address path location. Then make your second NTE by using 1 (one) in the appropriate address path location.
The reason I thought you had multiple NTE segments is because the NTE-1 in the example you sent has a ‘3’ in it implying there was a 1 and 2.
If you do find you can have multiple NTE segments inbound and if what you are adding has to go after only the first NTE, you would still do an ITERATE but what you do inside the ITERATE would change.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
We are trying to map multiple/ repetitive obx and NTE to OBX, it seems count for obx works and maps as usual, but when I try iterate nte to map obx, instead of create new obx, it overwrite on existing obx.
I am sure i am missing either basis or variable or loop, but if u can help me point in right direction, i would appreciate