Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

FormatNumberAsText ( number ; currency ; separator ; decimal ; precision )

Rate this function:  

  Average rating: 3.8  (59 votes)
  Discuss this Custom Function

Geoffrey Gerhard, Creative Solutions Incorporated

Number to text, padded/rounded to a specified number of decimal places, user specified decimal and thousands separators, optionally displayed currency symbol

Sample Input:
FormatNumberAsText ( 12345678901234567.1234 ; "$" ; "," ; "." ; 2 )
FormatNumberAsText ( 1234567.1234 ; "€" ; " " ; "," ; 2 )
Sample Output:
€1 234 567,12

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed


This function formats numbers for use in text strings or calculations with a text result. It's especially useful when there are multiple numbers in a text string and at least one must be displayed in a different format than the others. It works on numbers of any length, and produces its result without recursion.

Separator and Currency parameters are optional.
Decimal parameter defaults to "." or "," (based on localization) unless rounding is <= 0, in which case it's omitted.
Precision defaults to 2 if parameter is not a digit or is unspecified.

UPDATED 11.20.2009
Added " + 0" to declaration of "n" variable to deal with cases where the number parameter is null or empty.

UPDTED 09.10.2015
Fixed a bug that resulted in malformed numbers ( like "€10..05,05" ) in some European FMP 12 (and higher) files.
Modified Decimal to use the correct integer/fraction separator [ "." or "," ] for the file's region when the decimal parameter is null.

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


5 most recent comments | Show all 22 comments

Thank you so much! This is a great and necessary function. Any idea why FileMaker hasn't provided this as a standard feature?

Joe, Newport Beach, CA
April 22, 2016 1:53pm

Much appreciated. Just what I needed to correctly format currency amount totals within a text calculation field.

Ian, Melbourne Australia
April 27, 2016 11:35pm

This function saved the day!!! Shame on filemaker for not including it.

John, Portland, Oregon
June 30, 2016 9:49am

Thanks so much for this function—works!

Seamus Berkeley, Taos
October 17, 2016 9:31pm

Very nice custom function. Very useful. Works like a charm.

Luis Sardinha, Gloucester, UK
July 14, 2017 3:11am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 8 + 2 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. PreviousMonthEndDate ( myDate )
  (Wed, Mar 07, 3:35am)
2. PreviousMonthName (myDate)
  (Wed, Mar 07, 3:33am)
3. FmTableFields ( tableName ; fieldsInclude ; fieldsExclude ; classExclude ; typeExclude ; prefixExclude )
  (Fri, Mar 02, 6:32am)
4. sql.getTable ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:36am)
5. sql.getField ( fullyQualifiedFieldObject )
  (Thu, Feb 22, 8:34am)
6. FilterOut ( ListA ; ListB )
  (Wed, Feb 21, 6:11pm)
7. Char0 ( )
  (Sun, Feb 18, 2:35am)
8. CreateVCardFile ( FirstName ; LastName ; CompanyName ; Phone ; Email ; WEB ; hAddress1 ; hAddress2 ; hZip ; hCity ; hCountry ; wAddress1 ; wAddress2 ; wZip ; wCity%2
  (Sun, Feb 18, 1:50am)

RSS Feed of Custom Functions