Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting numbers into Letters on a Check

Status
Not open for further replies.

biglenny

Technical User
Dec 18, 2002
2
US
Hi ! I'm trying to write a simple check solution for my Filemaker set up on a Mac. I have the fields that can convert Numbers to Words, as in 3,300 to Three thousand three hundred thirty. I have fields for Millions, Thousands, Hundreds, Tens & Cents. How do I combine these different fields into One field to print the Dollar amount on a check ? Any help is greatly appreciated. THANX !
 
If you already have the fields defined that calculate the results of the 3,300, the solution is fairly simple.

You didn't provide any field names so I'll make up the names to be obvious. Substitute your real field names with mine.

You need to define one field, "Dollars Text" for example. This is a calculation field, and my preference is Not Saved, on the options.

Here are a couple of variations depending on the output you prefer. Your calculations would look like this:

"* * *"
&case(Millions > 0,Millions& " Million And ","")
&case(Thousands > 0,Thousands& " Thousand And ","")
&case(Hundreds > 0,Hundreds& " Hundred And ","")
&case(Tens > 0,Tens& " Dollars ","")
&ase(Cents > 0,Cents& " Cents"&,"")
&* * *"

or

"* * *"
&case(Millions > 0,Millions& " Million,","")
&case(Thousands > 0,Thousands& " Thousand, ","")
&case(Hundreds > 0,Hundreds& " Hundred, ","")
&case(Tens > 0,Tens& " Dollars, ","No Dollars")
&ase(Cents > 0,Cents& " Cents"&,"No Cents")
&* * *"


The " Million " is the text decription of the Million field. So if the Million field value was 2, the results of this calculation would be TWO Million. The space before and after the " Million " provides the space between the words. A comma inside the "," is text, outside this is part of the syntex. The & sign connect the calculations together.

I hope this answers your question.

Marty
 
I think what you want is more along the lines of this...

Either have a calculation field or a script that sets the field the way you want it. You'll need to use " " (a space in FMP output) and & (used for joining strings).

If you use a button, then the Set Field in Scriptmaker will be what you want.

The calculation should be along the lines of this (I'll denote field names, that I'm making up, in brackets)...

[Whole_Dollars_Text]&" "&"dollars"&" and "&[Pocket_Change_Text]&" "&"cents"

So if Whole_Dollars_Text equals "Three hundred thirty thousand" and Pocket_Change_Text equals "sevety-eight," you'd get:

"Three hundred thirty thousand dollars and seventy-eight cents"

Hope that helps,

-A.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top