web stats
Variable with ${originalFilename} not getting transformed - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2015, 05:12 PM
clinjohn clinjohn is offline
OBX.2 Kenobi
 
Join Date: Apr 2015
Posts: 95
clinjohn is on a distinguished road
Default Variable with ${originalFilename} not getting transformed

I have a destination transformer Variable called zipFile that has "${originalFilename}" for the Mapping, added to the Channel Map. Then in a postprocessor script I retrieve the file name with:

var zipFile = channelMap.get('zipFile');

When I do this the value of zipFile is the literal ${originalFilename} instead of the actual file name. I tried removing the double quotes in the Mapping, but that simply altered the value to the literal originalFilename. How do I get the channel to provide me with the real name for the file?
Reply With Quote
  #2  
Old 05-27-2015, 06:21 AM
mcalKno mcalKno is offline
 
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road
Default

I was able to accomplish it like this...

destination transformer:
Code:
channelMap.put('OrigFilename', sourceMap.get('originalFilename'));
postprocessor:
Code:
var zipFile = channelMap.get('OrigFilename')
Reply With Quote
  #3  
Old 05-27-2015, 08:30 AM
clinjohn clinjohn is offline
OBX.2 Kenobi
 
Join Date: Apr 2015
Posts: 95
clinjohn is on a distinguished road
Default

Thanks, that seems to have done the trick.
Reply With Quote
Reply

Tags
${originalfilename}, channel map, variable

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:30 AM.


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