Brian Dunning's FileMaker Custom Functions

Currency ( Amount, Code, Lead, Trail, ShowDecimal, RedNegative )

Format currency as text in many formats (inc. red negative)

  Average rating: 4.0 (41 votes) Log in to vote

Tony Tanevski   Tony Tanevski - Show more from this author
Hi-Voltage
http://www.hi-voltage.com.au

Share on Facebook Share on Twitter

  Sample input:
currency(100.44, "US", "$", "", 2, 0)
  Sample output:
US$100.44

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Format currency as text in many formats. Suitable for displaying currency for multiple countries. Option to display trailing characters. Option to display red negative amounts.

 

Comments

tom   tom, ShiftPoint
Jul 31, 2009
With FileMaker 10, "Code" is no longer allowed as a parameter name since it is now the name of an internal function.

A simple change of "Code" to something like "CodeLabel" everywhere in the function will suffice.
 
Fergus Black   Fergus Black, Peterborough UK
Jan 29, 2010
Very many thanks - an excellent resource.
 
Braxton   Braxton, Sacramento
Mar 29, 2010
This certainly beats:

"$" & Int (Round (Number;2)) & "." & Right (Round (Number;2) * 100;2)

Thank you very much!
 
Steve Hearn   Steve Hearn, London ON
Mar 11, 2011
Thanks for this. I added another parameter for thousands separator so it has the option of using one or not.
 
Joshua Paul   Joshua Paul, Neo Code
Sep 10, 2012
Love this function! Thanks Tony!!!
 
Adam Glick   Adam Glick, HelpDesk, Inc.
Feb 29, 2020
great little function that solved a need in some custom text blocks I generate in a quoting solution for a client. Thanks!
 

Log in to post comments.

 

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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: