web stats
Copying IN3-2 to IN2-61 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2017, 11:58 AM
fchang888 fchang888 is offline
Mirth Newb
 
Join Date: Mar 2015
Posts: 19
fchang888 is on a distinguished road
Default Copying IN3-2 to IN2-61

I need to get the value from IN3-2 and move it to IN2-61.

The only thing is that while referencing IN3-2, I have moved past
IN2-61 in my loop.

Snippet of inbound message.

MSH...
PID...
PV1...
IN1||||||
IN2||||
IN3||AAAAAA||
IN1||||
IN2||||
IN3||BBBBBB||

Need outbound to be

MSH...
PID...
PV1...
IN1||||||
IN2||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||AAAAAA
IN3||AAAAAA||
IN1||||
IN2||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||BBBBBB
IN3||BBBBBB||

Thanks in advance
Reply With Quote
  #2  
Old 03-13-2017, 06:31 AM
jg12345 jg12345 is offline
OBX.2 Kenobi
 
Join Date: Oct 2012
Posts: 99
jg12345 is on a distinguished road
Default

This will work:

Code:
for(var i=0;i<msg['IN3'].length();i++) {
msg['IN2'][i]['IN2.61']['IN2.61.1'] = msg['IN3'][i]['IN3.2']['IN3.2.1'].toString(); }
Reply With Quote
  #3  
Old 03-13-2017, 08:32 AM
fchang888 fchang888 is offline
Mirth Newb
 
Join Date: Mar 2015
Posts: 19
fchang888 is on a distinguished road
Default

Quote:
Originally Posted by jg12345 View Post
This will work:

Code:
for(var i=0;i<msg['IN3'].length();i++) {
msg['IN2'][i]['IN2.61']['IN2.61.1'] = msg['IN3'][i]['IN3.2']['IN3.2.1'].toString(); }

Thanks for that snippet of code. Now, "I see" it and it works.

Thanks!
Reply With Quote
Reply

Tags
insurance, repeating field

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 09:40 PM.


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