web stats
Mirth Community - View Single Post - Conditionally Edit CSV Help
View Single Post
Old 06-17-2015, 09:56 PM
mshort mshort is offline
Mirth Newb
Join Date: Apr 2015
Posts: 7
mshort is on a distinguished road
Default Conditionally Edit CSV Help


I'm using Mirth Connect [Mirth amateur here, so go easy on me]

I'm wanting to conditionally edit specific values in a csv. I've used a similar transformer logic to conditionally edit repeating HL7 fields and it worked fine. This is my first time working with csv files and looking to do the same. The csv looks like:
My destination transformer simply looks like:
for(var i = 0; i< msg['row'].length(); i++) {
if (msg['row'][i]['column1'].toString() == "mouse") {

msg['row'][i]['column1']= "test";
I'm attempting to set the last_name = "test" if the last_name = "mouse", however I can't seem to get this update/replace/set to actually happen.

[I've attached my channel if it helps]

Any help is greatly appreciated!
Attached Files
File Type: xml CSV_Manipulator.xml (17.1 KB, 9 views)
Reply With Quote