convert currency values in words | Adobe Higher Education
Skip to main content
Level 2
May 7, 2013
Beantwortet

convert currency values in words

  • May 7, 2013
  • 19 Antworten
  • 19643 Ansichten

i wants to convert indian currency in words i.e 199 (rupees one hundred ninety nine only) is there anybody who can tell me how to do the same

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von SaketSidana

Slight modifications: Spellings of dollars are incorrect which would cause incorrect replacement of the string. Also modified the code slightly. Please try it out and debug yourself.

form1.#subform[0].AMT_WORDS::exit - (FormCalc, client)

//RTGS_AMT::exit-(form calc,client)

var Y;

var Z;

Z = RTGS_AMT.rawValue;

AMT_WORDS.rawValue= WordNum(Z,2);

Y = AMT_WORDS.rawValue;

Y = Replace(Y,"Dollars","Rupees"); // changed spellings here.

Y = Replace(Y,"Cents","Paise");

AMT_WORDS.rawValue = Y;

// AMT_WORDS = WordNum(RTGS_AMT,Z,2); // This is not required.

19 Antworten

Adobe Employee
May 10, 2013

Instead of using the statement:

var Y,Z;

Use

var Y;

var Z;

i.e. you need to split up the var declarations. Thisi s not javascript but formcalc and hence, this nuance.

This should do it!

-Saket.

Level 2
May 10, 2013

rest is perfect or need some altration

Adobe Employee
May 10, 2013

Slight modifications: Spellings of dollars are incorrect which would cause incorrect replacement of the string. Also modified the code slightly. Please try it out and debug yourself.

form1.#subform[0].AMT_WORDS::exit - (FormCalc, client)

//RTGS_AMT::exit-(form calc,client)

var Y;

var Z;

Z = RTGS_AMT.rawValue;

AMT_WORDS.rawValue= WordNum(Z,2);

Y = AMT_WORDS.rawValue;

Y = Replace(Y,"Dollars","Rupees"); // changed spellings here.

Y = Replace(Y,"Cents","Paise");

AMT_WORDS.rawValue = Y;

// AMT_WORDS = WordNum(RTGS_AMT,Z,2); // This is not required.

March 24, 2023

worked successfully.
After trying various methods, found your post.
Thanks a lot

Level 2
May 11, 2013

Sir,

One more thing i would like to know that how i can set the digit terms in form calculation (i.e. if i have put a figure 100,000 the output come as one hundred thousand instead of one lac ) i have set the digit for lac but it only convert the value of 100000 when i went further it converts the value as usual like two hundred thousand,three hundred thousand. What would be the solution for that. I also have two numeric fields will it work for both fields if yes then what changes should be made in the script so that i can get the results.

regards

uma shankar

Adobe Employee
May 12, 2013

Y = Replace(Y,"hundred thousand", "lac");

Level 2
May 17, 2013

sir,

it only work if we converts the value from 100000 to 120000 but as well as we move further like 120001 it gets fail & converts the value in usual manner i.e. one hundred twenty thousand one only

regards

uma shankar

Level 2
May 31, 2013

it works very well

wackronie
August 26, 2015

This works great how , could the same be working for 3 decimals , it tried to convert to string and read the value with right function , but it fails as soon as there is number ends with zeros .Please help .

Grandtotal.format.picture.value = "z,zzz,zz9.999"

var x = wordnum(numtoword)

var y  = Right(Grandtotal, 3)

y = wordnum(y)

this.rawValue = Concat(x," Currency And ",Subcurrency," Fils")

May 1, 2020

Hi

I want to convert UAE currency in words i.e 10,199.55 (Ten Thousand One Hundred Ninety-nine & Fils Fifty-five Only) is there anybody who can tell me how to do the same.

 

Regards

 

Polson