web stats
Deleting fields - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2020, 12:03 PM
rutledj rutledj is offline
Mirth Guru
 
Join Date: Nov 2010
Location: North Carolina
Posts: 399
rutledj is on a distinguished road
Default Deleting fields

Is there a way to delete all of the fields in a given segment that occur after a certain field?

I need to delete all fields in the EVN segment, after the 6th field, so that it only contains 6 fields. I'm not seeing an easy way to do this.
Reply With Quote
  #2  
Old 01-13-2020, 12:29 PM
cory_cole cory_cole is offline
Mirth Guru
 
Join Date: Mar 2012
Posts: 1,348
cory_cole is on a distinguished road
Default

msg['OBX'] = msg['OBX.1'] +msg['OBX.2'] +msg['OBX.3'] +msg['OBX.4'] +msg['OBX.5']

will give you segments 1 - 5;
Reply With Quote
  #3  
Old 01-13-2020, 04:26 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,109
agermano is on a distinguished road
Default

Quote:
Originally Posted by cory_cole View Post
msg['OBX'] = msg['OBX.1'] +msg['OBX.2'] +msg['OBX.3'] +msg['OBX.4'] +msg['OBX.5']

will give you segments 1 - 5;
No, it won't, but this will (assuming there is only 1 OBX segment)
Code:
msg['OBX'] = <OBX>{msg['OBX.1'] +msg['OBX.2'] +msg['OBX.3'] +msg['OBX.4'] +msg['OBX.5']}</OBX>
Reply With Quote
Reply

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:17 PM.


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