How to convert numbers to text in a form created in LiveCycle Designer? | Community
Skip to main content
Level 2
Jun 17, 2009 10:56 PM UTC
Solved

How to convert numbers to text in a form created in LiveCycle Designer?

I am relatively new to Livecycle Designer and very much a newbie with JavaScript and FormCalc.  I have created a Conditional Sales Contract form and when the user enters a dollar amount (1548.95) I would like to know how to  auto fill a text field with its text equivalent ( One Thousand Five Hunderd and Fourty-eight dollars and ninety-five cents).  I have found two forums explaining how to do this in Acrobat 8 but nothing in LiveCyle Designer.   Can this be done in LiveCycle and can anyone please help me with the script?

thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
_Bruce_Robertson
_Bruce_RobertsonAccepted solution
Level 10
Jun 20, 2009 4:41 PM UTC

Hi Peter,

You could move the WordNum function to the calculate event of the text field (might be a better place for it anyway).

So you would have something like;

WordNum(NumericField2

, 2)

Bruce

----- form1.#subform[1].DollarAmountText::calculate: - (FormCalc, client) ------------------------------

13 replies

New Participant
Aug 30, 2020 4:09 PM UTC

how to convert words to numbers using adobe 

Translate
JainSa
Level 2
Mar 29, 2018 12:21 PM UTC

Hi I'm new to learn Live cycle Designer and very much a newbie with JavaScript and Form Calc.  I have created a Manual form(Amount and Amount in word) in amount Field entered value (100000 INR) I would like to know how to  auto fill a text field with its text equivalent ( One lakhs only).

But the value come Different :One Hundred Thousand only.(I think this is Us Relevant,but I don't need this.i want India Format)

I wrote code in Formcalc:

Concat(WordNum(amount),space(1),"Only").

then try WordNum(amount)


Translate
New Participant
Dec 14, 2022 10:11 AM UTC

Hi Jain,

          

           I am also looking for the Indian currency in adobe form. could you help to solve that.

 

Thanks,

Bijesh RB.

 

Translate
Jul 10, 2013 2:56 PM UTC

Hi Bruce,

Can I add prefix and suffix to the converted text?

eg.  "SAY US ONE HUNDRED SIXTY THOUSAND DOLLARS AND SIXTY FIVE CENTS ONLY."

Can I make the converted text auto upper case?

Thanks

Jay

Translate
Mar 18, 2010 6:18 PM UTC

Hey Bruce,

   thanks man. the replace works great.  i dont mind being hacky .

thanks again,

Translate
_Bruce_Robertson
Level 10
Mar 18, 2010 11:13 AM UTC

I see what you mean, very annoying.  I can only guess you could try something really hacky like;

Replace(Replace(Replace(Replace(WordNum(x,2

), "Dollars ",""), "Dollar ",""), "Cents", ""), "Cent", "")

Sorry

Bruce

Translate
Mar 16, 2010 4:52 PM UTC

Hi Bruce,

    Yes, but this will not also print in words any figure after the decimal. i.e. Amount = 1.25, with wordmum(Amount), the output is One. i want it to print One and Twenty Five as it should.

with wordnum(amount, argument), i get "dollars" and "cents" in the output. can i get the output without "dollars" and "cents" as part of the output.

thanks in advance.

Translate
_Bruce_Robertson
Level 10
Mar 16, 2010 8:27 AM UTC

Hi stejpal,

Just leave of the second argument, that is just use WordNum(NumericField2)

Bruce

Translate
Mar 15, 2010 12:19 PM UTC

Hi,

    Using the WordNum formcalc function, how can i get the output without the "Dollars" and "cents"?

thanks,

Translate
Level 2
Jun 22, 2009 4:02 PM UTC

Thanks very much for your help Bruce that's done it!!

Translate
_Bruce_Robertson
_Bruce_RobertsonAccepted solution
Level 10
Jun 20, 2009 4:41 PM UTC

Hi Peter,

You could move the WordNum function to the calculate event of the text field (might be a better place for it anyway).

So you would have something like;

WordNum(NumericField2

, 2)

Bruce

----- form1.#subform[1].DollarAmountText::calculate: - (FormCalc, client) ------------------------------

Translate