Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Mirth originalFilename rename

I have been trying to remove .dat from ${originalFilename} in destination when i tried to do this ${originalFilename}.txt it gave me like 1652807798759.dat.txt how can i get 1652807798759.txt only without .dat in it

I have tried to do this in Destination's Transformer but no luck

channelMap.put('OrigFilename', sourceMap.get('originalFilename'));

var outFile = channelMap.get('OrigFilename');
logger.info('outFile ' + outFile ); // i am getting outFile as null here
//outFile=outFile.replace('.dat','');
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

A simple replace should work:

//test it with a static string first, in real code use sourceMap.get('originalFilename').toString();
var outFile = '1652807798759.dat.txt' ; 
outFile = outFile.replace(/\.dat/g, "");
logger.info('outFile ' + outFile );
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!