AnsweredAssumed Answered

Number to text problem

Question asked by AllenEshleman on Oct 23, 2012
Latest reply on Oct 24, 2012 by AllenEshleman

Summary

Number to text problem

Product

FileMaker Pro

Version

12.0.2

Operating system version

Windows XP Professional SP 3

Description of the issue

In previous versions the following calculation converted a number to text (on a receipt, for instance).  Now it does not do it.  Can someone tell me what I need to change?  This is for printing a receipt where "Amount of last gift" is the field with the number amount.

Choose(Int(Mod(Amount of last gift;10^12) / 10^11); ""; "One Hundred "; "Two Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ") &
If(Int(Mod(Amount of last gift;10^11) / 10^10) = 1;
Choose(Int(Mod(Amount of last gift;10^10) / 10^9); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");
Choose(Int(Mod(Amount of last gift;10^11) / 10^10); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") &
Choose(Int(Mod(Amount of last gift;10^10) / 10^9); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &
Case(Int(Mod(Amount of last gift;10^12)/10^9) and Int(Mod(Amount of last gift;10^9) / 10^3); "Billion, "; Int(Mod(Amount of last gift;10^12)/10^9);"Billion ";"")
&
Choose(Int(Mod(Amount of last gift;10^9) / 10^8); ""; "One Hundred "; "Two Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ") &
If(Int(Mod(Amount of last gift;10^8) / 10^7) = 1;
Choose(Int(Mod(Amount of last gift;10^7) / 10^6); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");
Choose(Int(Mod(Amount of last gift;10^8) / 10^7); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") &
Choose(Int(Mod(Amount of last gift;10^7) / 10^6); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &
Case(Int(Mod(Amount of last gift;10^9)/10^6) and Int(Mod(Amount of last gift;10^6) / 10^3); "Million, "; Int(Mod(Amount of last gift;10^9)/10^6);"Million ";"")
&
Choose(Int(Mod(Amount of last gift;10^6) / 10^5); ""; "One Hundred "; "Two Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ") &
If(Int(Mod(Amount of last gift;10^5) / 10^4) = 1;
Choose(Int(Mod(Amount of last gift;10^4) / 10^3); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");
Choose(Int(Mod(Amount of last gift;10^5) / 10^4); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") &
Choose(Int(Mod(Amount of last gift;10^4) / 10^3); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &
Case(Int(Mod(Amount of last gift;10^6)/10^3) and Int(Mod(Amount of last gift;10^3) / 10^0); "Thousand, "; Int(Mod(Amount of last gift;10^6)/10^3);"Thousand ";"")
&
Choose(Int(Mod(Amount of last gift;10^3) / 100); ""; "One Hundred "; "Two Hundred "; "Three Hundred "; "Four Hundred "; "Five Hundred "; "Six Hundred "; "Seven Hundred "; "Eight Hundred "; "Nine Hundred ") &
If(Int(Mod(Amount of last gift;100) / 10) = 1;
Choose(Int(Mod(Amount of last gift;10)); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");
Choose(Int(Mod(Amount of last gift;100) / 10); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") &
Choose(Int(Mod(Amount of last gift;10)); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) & Case(Int(Amount of last gift) > 1; "Dollars"; Int(Amount of last gift) = 1; "Dollar"; "")
&
If(Mod(Amount of last gift; 1) and Int(Amount of last gift);" and ";"") &
If(Mod(Int(Amount of last gift*10); 10) = 1;
Choose(Mod(Int(Amount of last gift*100); 10); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");
Choose(Mod(Int(Amount of last gift*10); 10); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") &
Choose(Mod(Int(Amount of last gift*100); 10); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &
Case(Mod(Amount of last gift; 1) > .01; "cents"; Mod(Amount of last gift; 1) = .01; "cent";"")

Expected result

"50.00" becomes "fifty"

Actual result

blank - nothing

Outcomes