FormatThousands ( Number ; Precision ; Separator )
Formats a number separating the thousands by a user specified character.
Average rating: 4.1 (34 votes) Log in to vote
Rob Poelking - Show more from this author
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Formats any real number separating the thousands position by a user specified character and also specifies the precision of digits after a decimal.
Gary Amstutz, Sweetwater
Feb 9, 2016
This function works great, but it won't work with negative numbers properly.
Try changing the fifth line to:
neg = If ( GetAsNumber ( number ) < 0; "-"; "") ;
and that should fix it.
If you need a function that doesn't force the result to a fixed length decimal number, try FormatThousands (textNum) found at https://www.briandunning.com/cf/1853
Rob, Cleveland, OH
Feb 10, 2016
|Thanks Gary, I wrote that some time ago and honestly can't remember why I wrote it that way.|
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.