Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AmountText ( amount )

Featured Replies

Name & Parameters: [color:red][big] AmountText ( amount ) [/big]

Description: Not quite mine, just adapted from a formula posted on the FMP website. Returns the check-style text line given a dollar amount in a number field referenced by the "amount" parameter. As posted, only works with US Currency, but I'm sure it can be modified for anything.

Sample Input:

123.45

Results:

One Hundred Twenty Three Dollars and Forty Five cents

Recursive: no

Formula:

Choose(Int(Mod(amount;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;10^11) / 10^10) = 1;

Choose(Int(Mod(amount;10^10) / 10^9); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;10^11) / 10^10); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") & 

Choose(Int(Mod(amount;10^10) / 10^9); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) &

Case(Int(Mod(amount;10^12)/10^9) and Int(Mod(amount;10^9) / 10^3); "Billion, "; Int(Mod(amount;10^12)/10^9);"Billion ";"")

& 

Choose(Int(Mod(amount;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;10^8) / 10^7) = 1;

Choose(Int(Mod(amount;10^7) / 10^6); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;10^8) / 10^7); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") & 

Choose(Int(Mod(amount;10^7) / 10^6); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) & 

Case(Int(Mod(amount;10^9)/10^6) and Int(Mod(amount;10^6) / 10^3); "Million, "; Int(Mod(amount;10^9)/10^6);"Million ";"")

& 

Choose(Int(Mod(amount;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;10^5) / 10^4) = 1;

Choose(Int(Mod(amount;10^4) / 10^3); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;10^5) / 10^4); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") & 

Choose(Int(Mod(amount;10^4) / 10^3); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) & 

Case(Int(Mod(amount;10^6)/10^3) and Int(Mod(amount;10^3) / 10^0); "Thousand, "; Int(Mod(amount;10^6)/10^3);"Thousand ";"")

& 

Choose(Int(Mod(amount;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;100) / 10) = 1;

Choose(Int(Mod(amount;10)); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");

Choose(Int(Mod(amount;100) / 10); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") & 

Choose(Int(Mod(amount;10)); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) & Case(Int(amount) > 1; "Dollars"; Int(amount) = 1; "Dollar"; "")

& 

If(Mod(amount; 1) and Int(amount);" and ";"") & 

If(Mod(Int(amount*10); 10) = 1;

Choose(Mod(Int(amount*100); 10); "Ten "; "Eleven "; "Twelve "; "Thirteen "; "Fourteen "; "Fifteen "; "Sixteen "; "Seventeen "; "Eighteen "; "Nineteen ");

Choose(Mod(Int(amount*10); 10); ""; ""; "Twenty "; "Thirty "; "Forty "; "Fifty "; "Sixty "; "Seventy "; "Eighty "; "Ninety ") & 

Choose(Mod(Int(amount*100); 10); ""; "One "; "Two "; "Three "; "Four "; "Five "; "Six "; "Seven "; "Eight "; "Nine ")) & 

Case(Mod(amount; 1) > .01; "cents"; Mod(amount; 1) = .01; "cent";"") 

Required Functions:

Author(s):P mx4px

Date: 06/09/06

Credits: www.filemaker.com & Andy Frazier

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

AmountTextSample.zip

  • Newbies

Thanks for this! You are a life saver!!! I had an idea of how I wanted to write it, but was not looking forward to figuring it all out. Thanks!!!

  • 5 months later...

... Isn't this one more straight forward?

http://www.briandunning.com/cf/436

  • 8 months later...
  • Author

Genx, the cf you referenced from Brian's site accomplishes something different...that one will take 123.45 and give you "US$123.45." Mine will take 123.45 and give you "one hundred twenty three dollars and forty-five cents".

The point of mine is to give you the amount in WORDS, like you'd see in the text area of a check.

The technique has been around for a long time.

I just did a search for Numbers to Text, and found this Link

There is a file I pointed to, and a CF that Mr. Vodka pointed to.

HTH

Lee

  • Author

Naturally, Mr. Smith - there is nothing new under the sun!! Also, as I mentioned, the "technique" wasn't mine...it was FMI's; I just modified it slightly to make it available as a CF in case someone needed it that way.

The function you referenced (http://www.briandunning.com/cf/22) is indeed something I hadn't seen - but then again it was posted a month after I posted this. Plus it requires two other functions - this one's self-contained. Like all things free, though - use it if you like, don't if you don't!!

'Nuff said.

The function you referenced (http://www.briandunning.com/cf/22) is indeed something I hadn't seen - but then again it was posted a month after I posted this.

Well thats pretty strange considering that I posted the link to that CF on Wed Nov 09 2005 01:24 PM . Hehe... :

  • Author

Sorry, Mr. Vodka. Just looked at it and it said it was updated in July of '06. Didn't mean to steal your thunder!

Nah not stealing any thunder... I was just teasing you. It always helps to have different methods to solve the same problem. :

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.