Step: 1
Create table with below fields
| Field Label | Field Name | Type |
| Amount | u_amount | String |
| In words | u_in_words | String |

Step: 2
Write a OnChange Client Script

var number = g_form.getValue('u_amount');
var numInWords=convertToWords(number);
g_form.setValue('u_in_words',numInWords);
function convertToWords(n){
var num = "Zero one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen".split(" ");
var tens = "twenty thirty fourty fifty sixty seventy eighty ninety".split(" ");
if(n<20) return num[n];
var digit=n%10;
if(n<100)
{
return tens[~~(n/10)-2]+(digit?"-"+num[digit]:"");
}
if(n<1000)
{
return num[~~(n/100)]+ " hundred "+(n%100==0? " ": "and "+convertToWords(n%100));
}
else
{
return convertToWords(~~(n/1000))+" thousand "+(n%1000!=0? " "+convertToWords(n%1000):" ");
}
}
Step: 3
Check Result:

***Please give your valuable comments in comments section. Thank you for Visiting our Post***

