web stats
Creating repeat segment - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-11-2015, 05:08 AM
jarlrmai jarlrmai is offline
Mirth Newb
Join Date: Jul 2015
Posts: 23
jarlrmai is on a distinguished road
Default Creating repeat segment

I have this code

logger.info("No PV1.17 copy PV1.9");

tmp['PV1']['PV1.17'] = msg['PV1']['PV1.9']; //duplicate-strip

var newPV17 = new XML('<PV1.17/>');				
newPV17['PV1.17.1'] = globalMap.get('consultantcodeMap').get(msg['PV1']['PV1.9']['PV1.9.1'].toString().substr(0,8));
newPV17['PV1.17.9'] = "TCPAS";
tmp['PV1'][0]['PV1.17'][1] += newPV17;
My expectation is that it should clone PV1.9 over the top of PV1.17 then add a second PV1.17 segment with the 2 fields from the array lookup and the string but it just seems to add the XML at the end of the PV1 segment to PV1.60 which isnt even in the template.

Any ideas?

Last edited by jarlrmai; 08-11-2015 at 06:25 AM.
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 05:19 PM.

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