web stats
$Count file name - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-07-2014, 01:32 AM
janssepi janssepi is offline
What's HL7?
Join Date: Jan 2014
Posts: 1
janssepi is on a distinguished road
Default $Count file name

is it possible to format the var count with leading zero's
Reply With Quote
Old 07-07-2014, 07:20 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road

Yes it's possible. In your transformer, include the StringUtils class:

$co('StringUtils', org.apache.commons.lang3.StringUtils);
Then in your destination template you can use it to pad the count:

${StringUtils.leftPad(${COUNT.toString()}, 5, '0')}
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote

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 09:46 PM.

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