web stats
adding a line of txt - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2016, 09:56 AM
copem@gbgh.on.ca copem@gbgh.on.ca is offline
Mirth Newb
 
Join Date: Nov 2015
Posts: 17
copem@gbgh.on.ca is on a distinguished road
Default adding a line of txt

I have a txt file and I want Mirth to write line of txt into a csv text file

how can I get javascript to write

aaa,bbb,ccc,ddd

to the first line in the text file

I have mirth picking up the file and removing the old first line and I want to replace it with the above

I'm running Mirth Connect 3.3.2.7911
Reply With Quote
  #2  
Old 05-11-2016, 10:22 AM
mcalKno mcalKno is offline
 
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road
Default

Quote:
Originally Posted by copem@gbgh.on.ca View Post
I have a txt file and I want Mirth to write line of txt into a csv text file

how can I get javascript to write

aaa,bbb,ccc,ddd

to the first line in the text file

I have mirth picking up the file and removing the old first line and I want to replace it with the above

I'm running Mirth Connect 3.3.2.7911
always replacing with a static value in row 0?

PHP Code:
for(var i=0;i<msg.ROW.length;i++)
{
    if(
== 0)
    {
        
delete msg['row'][0];
    }
    
}
msg['row'][0]['column1'] = 'aaa';
msg['row'][0]['column2'] = 'bbb';
msg['row'][0]['column3'] = 'ccc'
Reply With Quote
  #3  
Old 05-11-2016, 10:29 AM
copem@gbgh.on.ca copem@gbgh.on.ca is offline
Mirth Newb
 
Join Date: Nov 2015
Posts: 17
copem@gbgh.on.ca is on a distinguished road
Default that's it

thanx for the help

I need to learn java faster
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 08:09 AM.


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