Thanks Julian,

I did something similar and set a counter and it works as expected.

One more query, I am also trying to iterate the OBXGrp().NTE's but the IF statement  is returning false, can you see anything wrong with the syntax?

 
For each: source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).NTE()}
                ..Contains(source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(k2).NTE(k2):Comment()},"192MT")
                        CODE:   S INAB = 1
 
 
 
I’m testing against this message so it should be picking up the OBX NTE with ‘192M’:

Additional info:

I've added the following DTL and managed to append the ORC NTE segments from inbound message to outbound translated message PID NTE, issue is when I have multiple  ORC NTEs to append to PID NTE they overwrite as opposed  to appending as multiple NTE segments:

for each source.{PIDgrpgrp().ORCgrp().NTE()}

append target.{PIDgrpgrp().PIDgrp.NTE(k1)} source.{PIDgrpgrp().ORCgrp().NTE(k1)}

endeach

test- you can see only the one NTE is copied over:

Hi, Yes its VS Code Version 1.27.2 (1.27.2) and I am using same extension ver 0.3.6.

I  Ive managed to change user Settings for ObjectScript extension as suggested - cos.con.ns="USER" and I have opened a cache session in VS Code Terminal window.

So next question is how do I compile my test.mac in VS Code terminal?

PS I would send an image but I don't know how as the image loader asks for a URL, images are on my desktop and will not load.

Apologioes for these basic set up questions, I have done as you've said but cannot achieve same.

I have created a directory /Desktop/Programmes/COS/ and saved a test.mac script . I have opened Visual studio, selected file - open workspace and navigated to said directory. If I then select Code-Prefernces-Settings I get a different menu in Settings, not User Default Settings  as displayed in your GIF, I cant seem to find a option for CacheObjectScript settings or a  menu resembling yours at all, Id send an image but screenshot is on my desktop and the image loader takes url so not sure how this works!