Brian Dunning's FileMaker Custom Functions

RoundDecimals ( Number ; Decimals )

Number field formatting as a calc

  Average rating: 3.8 (39 votes) Log in to vote

Martin Norén   Martin Norén
Square Moon Ind. AB
http://www.squaremoon.nu

Share on Facebook Share on Twitter

  Sample input:
RoundDecimals ( 2 ; 3 )
  Sample output:
2,000

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

The purpose of the function is to make ,5 to 0,50 without field formatting. This is convenient when sending confirmation mails in fixed width font, with aligned right margin, for the amounts.

Number=A number or text field
Decimals=The number of digits you want after the decimal character


Comment: Switch the separator to the appropriate one for your country (and the FileMaker calc separator as well...). As noticed above, the limit is 10 digits after the separator //MartinN

 

Comments

Pedro Cordoves   Pedro Cordoves, Technology Group
Feb 14, 2020
The function works fine, but there is a problem if the number is between 0 and -1, for example: -0,1
 

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: