web stats
How to clear out a field completely - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2012, 04:44 AM
rutledj rutledj is offline
Mirth Guru
 
Join Date: Nov 2010
Posts: 205
rutledj is on a distinguished road
Default How to clear out a field completely

If I have the following

NK1|1|Jane^Doe|||555-555-5555||SON

and I want to replace the ^ between the name with a space, how do I do that so in the end I'd have this:

NK1|1|Jane Doe|||555-555-5555||SON

Thanks
Reply With Quote
  #2  
Old 04-28-2012, 06:37 PM
nelson.wells nelson.wells is offline
OBX.1 Kenobi
 
Join Date: Sep 2010
Posts: 26
nelson.wells is on a distinguished road
Default

Something like this should work

Code:
msg['NK1']['NK1.2']['NK1.2.1'] = msg['NK1']['NK1.2']['NK1.2.1'].toString() + msg['NK1']['NK1.2']['NK1.2.2'].toString();
msg['NK1']['NK1.2']['NK1.2.2'] = '';
So, basically, you'll want to assign the first sub-segment to the concatenation of the first sub-segment and the second sub-segment, and then blank out the second sub-segment.
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 -7. The time now is 02:32 AM.


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