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  (61 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.


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 24 comments

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

Nice one.

Thanks very much

Alistair Hay, Harrogate, UK
April 10, 2018 9:19am

Brilliant! Many thanks.

Chris, Whitianga, NZ
April 28, 2018 7:30pm

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 + 8 =
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. SortList ( theList )
  (Sat, Jun 23, 8:45am)
2. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
3. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
4. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
5. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
6. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
7. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
8. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)

RSS Feed of Custom Functions