web stats
loop through FT1 Segments - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-23-2011, 02:16 AM
Erik Erik is offline
Mirth Newb
Join Date: Sep 2011
Location: the Netherlands
Posts: 9
Erik is on a distinguished road
Default loop through FT1 Segments

I want to update the Transaction Id in the FT1 segments of a DFT message.
I have a script as follows

for(var i=0;i<msg.children().length();i++){
var curSeg = msg.children()[i];
if(curSeg.name() == "FT1"){
msg['FT1'][i]['FT1.2']['FT1.2.1']= sNieuwVolgnummer;

the problem is the variable i
when I change this line in following
msg['FT1'][0]['FT1.2']['FT1.2.1']= sNieuwVolgnummer;
then it works fine but just for the first segment

can anyone help?

Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 12:40 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Mirth Corporation