These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

To apply formatting in text field to do Money formatting

Neenu
Registered: Jan 21 2010
Posts: 2

Hi All,

I have a dollar field,i have kept it as a text field (Since numeric and decimal field have problem of rounding off).If dollar value is entered i want it to get frmatted by appending (.00) at the end if it is non-decimal number.I have developed a pattern which will do all the functionalities except if whole number is entered it will not append (.00) at the end.

Please find my pattern(this I have implemented for 18 digits)

text{999,999,999,999,999,999}|text{99,999,999,999,999,999}|text{9,999,999,999,999,999}|text{999,999,999,999,999}|text{99,999,999,999,999}|text{9,999,999,999,999}|text{999,999,999,999}|text{99,999,999,999}|text{9,999,999,999}|text{999,999,999}|text{99,999,999}|text{9,999,999}|text{999,999}|text{99,999}|text{9,999}|text{999}|text{99}|text{9}

can any one help me in this regard.Thanks in Advance!!!

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
You can use FormCalc to add the ".00" to your value.

Put this script into the exit event of your textfield...
var MyAmount = $var MyNewAmount = Concat($, ".00")$ = MyNewAmount

...and this into the enter event, to remove the ".00".
var MyAmount = $var MyNewAmount = Replace(MyAmount ,".00", "")$ = MyNewAmount

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs