Level 1

0% to

Level 2

Tip /

to gain points, level up, and earn exciting badges like the new
Mission!

View all

## convert currency values in words

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

07-05-2013

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

#### Accepted Solutions (1)

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

10-05-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.

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

17-05-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

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

12-05-2013

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

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

10-05-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

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

08-05-2013

Here's how you can do this.

"Get the value in dollars and cents using WordNum function and replace "dollar" and "cents" with "rupees" and "paise" respectively.

I have a numeric field NumericField1, TextField1 displays its value in dollars/cents and TextField2 displays rupees/paise. Try this script written on exit event on numeric field once a value is entered in numeric field. You can customize the script based on your use case.

// form1.sf1.NumericField1::exit - (FormCalc, client)

var y;

var z;

z = sf1.NumericField1.rawValue;

sf1.TextField1.rawValue= WordNum(z,2);

y = sf1.TextField1.rawValue;

y = Replace(y,"Dollars","Rupees");

y = Replace(y,"Cents","paise");

sf1.TextField2.rawValue = y;

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

07-05-2013

Use the function WordNum available in Form Calc. See help page: http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=001531.html

polsonap
Level 1

Likes

0 likes

Total Posts

1 post

0 solutions
View profile

polsonap
Level 1

Likes

0 likes

Total Posts

1 post

0 solutions
View profile
polsonap
Level 1

01-05-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

wackronie
Level 1

Likes

0 likes

Total Posts

5 posts

0 solutions
View profile

wackronie
Level 1

Likes

0 likes

Total Posts

5 posts

0 solutions
View profile
wackronie
Level 1

25-08-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")

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

31-05-2013

it works very well

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

09-05-2013

rest is perfect or need some altration

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

09-05-2013

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.

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

09-05-2013

sir,

i have tried the currency formula which you have mentioned earlier in your reply i found that the variable which we have declared in the script editor the programme gives an error at line no. 2 column no. 6 which is variable y i am attaching the error file anong with the code which i have putted into it.

This is the code which i have putted into script writer

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

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

var Y,Z;

Z = RTGS_AMT.rawValue;

AMT_WORDS.rawValue= WordNum(Z,2);

Y = AMT_WORDS.rawValue;

Y = Replace(Y,"Dollers","Rupees");

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

AMT_WORDS.rawValue = Y;

AMT_WORDS = WordNum(RTGS_AMT,Z,2);

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

08-05-2013

Good to know that your original issue of currency conversion is solved.

Please check your MS access installation. It's working on one of your systems, hence it must be some issue in configuration/installation.

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

08-05-2013

Dear sir,

i have created database of adobe livecycle form it working properly on my home pc but as well as i have coppied the same on my office pc it dosent work properly rather ms access is installed on both systems but it is not creating the database at the office pc, how do it come possible for me to proper functionality at office system, is it require the data file as well as the form on the office pc

uma shankar

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

07-05-2013

Sir,

Could you please write a simple illustrative code in reply so i can easily understand the same, it would be the greatest pleasure for me to get assisted by you

uma shankar

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

07-05-2013

Parse the number separated through the decimal field and use WordNum function to generate strings for the resultant numbers. Eg:

Let's say you have two fields in the form. 1 numeric field which holds the value you wish to convert into words and 1 textfield where you wish to display the value. Use a script like:

sf1.TextField1.rawValue = WordNum(sf1.NumericField1)

This would give you the value of number (before the decimal) in words. Of course, you need not assign this value to a field as I did. this was just an illustration and you can use a variable in script to store values.Similarly, you can do the same for number after the decimal.

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile
BARETH_1981
Level 2

07-05-2013

how we can create the string in word num function because all the formula is inbuilt

uma shankar

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile

SaketSidana
Employee

Likes

9 likes

Total Posts

59 posts

4 solutions
View profile
SaketSidana
Employee

07-05-2013

This function is only supported for English (US) localei .e. for Dollar.

WordNum(n1 [, n2 [, k ]]) where k is the locale.

For Indian currency, you'll have to do it a bit differently.

1) Get the number in words before the decimal point using the WordNum function.

2) Get the number in words after the decimal point using the WordNum function.

Create the appropriate string by appending string "rupees" and "paise" at required places in the text field where you would be displaying the value. this is what I could think of at this point of time. Try it out. This should work.

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions
View profile

BARETH_1981
Level 2

Likes

7 likes

Total Posts

24 posts

0 solutions