web stats
concat multiple in1 segment into the PID 34.1 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 12-18-2019, 08:27 AM
math1964 math1964 is offline
Mirth Newb
Join Date: Apr 2019
Posts: 15
math1964 is on a distinguished road
Default concat multiple in1 segment into the PID 34.1

Is the code the best way to concat/combine multiple in1 segments into the PID 34.1 segment?

msg.PID['PID.34']['PID.34.1'] = msg.IN1['IN1.2']['IN.2.2'].toString() + msg.IN1['IN1.5']['IN1.5.1'].toString() + msg.IN1['IN1.5']['IN1.5.2'].toString() + msg.IN1['IN1.5']['IN1.5.2'].toString() + msg.IN1['IN1.5']['IN1.5.3'].toString() + msg.IN1['IN1.5']['IN1.5.4'].toString() + msg.IN1['IN1.5']['IN1.5.4'].toString() + msg.IN1['IN1.5']['IN1.5.5'].toString() + msg.IN1['IN1.1']['IN1.49.1].toString();
Reply With Quote
Old 12-18-2019, 11:09 AM
cory_cole cory_cole is offline
Mirth Guru
Join Date: Mar 2012
Posts: 1,360
cory_cole is on a distinguished road

I would probably put some kind of delimiter (even a + ' ' +) between them. And I believe that IN1 is a repeatable segment and your code will error if there is multiple. You will either need msg['IN1'][0] or for each loop.
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 06:46 AM.

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