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

Convert Number to Word using a different Currency

zebra
Registered: Jun 24 2006
Posts: 9

Dear Gurus,

FormCalc function WordNum works fine however gives the value in words with Dollar and Cent as currency symbol.

Is there a way to use this function (or any other similar function) to get the result in my desired currency (specially when a different locale cannot be used). For e.g I have a Field "txtrup" where user puts in the numerical value and the result in words is shown in a Field "txtinwords" using WordNum(txtrup,2). If for instance we put 1 in Field "txtrup" the result in Field "txtinwords" would be "one Dollar and zero cents". Now I want the result as "one Rupee and zero paisas".

How can above be achieved.

Furhter please guide how can user defined Functions be added to LifeCycle designer. If it is not too much to ask, I shall be highly grateful if a code showing JavaScript funtion for conversion of word for use in LifeCycle designer is illustrated.

Regards

My Product Information:
LiveCycle Designer, Windows
thibosshere
Registered: Jul 12 2010
Posts: 7
Hi,
I am try to do this but not working number to words conversion in Adobe LiveCycle Designer.i am placing two text box in my Adobe LiveCycle Designer layout then coping above code in Java Script Exit event then execute my form not working and i am checking Documnent properties - - >Security Tab - -> it shows this pdf form has restrict some operation. What should i do ?
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

the WordNum function does not work in JavaScript, it's a FormCalc function.

You can use the function for another currency too.
But you need to use a custom script like this:
var a = MyNumericField.rawValuevar aLenght = Len(a)var aPostComma = Right(a,2)var aPreComma = Left(a, aLenght -3) aPostComma = WordNum(aPostComma)aPreComma = WordNum(aPreComma)$ = Concat(aPreComma, " Euro ", aPostComma, " Cent")

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs