web stats
How to copy a value from one segment to another only if the value exist - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2016, 11:31 AM
derickmiller derickmiller is offline
Mirth Newb
 
Join Date: Mar 2015
Posts: 18
derickmiller is on a distinguished road
Default How to copy a value from one segment to another only if the value exist

Hello. I am trying to find out how to copy a value in the PV1 segment to the OBX segment but not into not every OBX segment. For example if PV1.20 is populated, I want to copy it into the first OBX segment in the OBX5.1 field. If PV1.19 is populated, I want to copy that into the second OBX segment in the OBX 5.1 field. I searched a number of threads, but no luck. I am sure this is very simple, but I cannot figure it out. Any help is appreciated.




Mirth version is 3.4.0.8000
Reply With Quote
  #2  
Old 07-26-2016, 12:43 PM
derickmiller derickmiller is offline
Mirth Newb
 
Join Date: Mar 2015
Posts: 18
derickmiller is on a distinguished road
Default

Figured it out, once I got an error that was found on the form. This was the solution.


msg['OBX'][0]['OBX.5']['OBX.5.1'] = msg['PV1']['PV1.20'] ['PV1.20.1'];
msg['OBX'][1]['OBX.5']['OBX.5.1'] = msg['PV1']['PV1.19'] ['PV1.19.1'];
Reply With Quote
Reply

Tags
obx, pv1

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 03:56 AM.


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