
1. Re: Forced Decimal Place Formula Help
philmodjunk Jun 19, 2013 7:13 AM (in response to sportyguy209)Why not just use data formatting on the inspector's data tab to format the data to have two decimal places?
There are cases where such a calculation is necessary, but I wouldn't use a calculation if formatting the field achieves an acceptable result as it is much simpler.
Let ( [ d = Round ( Self ; 2 ) ; i = Int ( d ) ; f = ( d  i ) * 100 ] ; i & "." & Right ( "0" & f ; 2 ) )

2. Re: Forced Decimal Place Formula Help
sportyguy209 Jun 20, 2013 3:22 AM (in response to sportyguy209)Thank you, that worked!
I don't remember why, but I was not able to get the inspector's data tab to work. The numbers showed up correctly in FileMaker, but when I exported the data, if there were 0's at the end of the number (15.00 turned into 15), they were dropped or something like that.

3. Re: Forced Decimal Place Formula Help
philmodjunk Jun 19, 2013 8:16 AM (in response to sportyguy209)Yes, that is one reason for using the calculation. The data format option in the inspector is for display purposes only, it does not change the data actually present in the fieldwhich is what is then exported.
Please note that rounding values like this should be done with caution. If the value is used in subsequent calculations that reference the rounded instead of the unrounded value, you could introduce error into your calculated result. In such cases, you may need to have a calculation field with this expression to use for exporting the value while you use the original value for such calculations.

4. Re: Forced Decimal Place Formula Help
sportyguy209 Jun 20, 2013 3:24 AM (in response to sportyguy209)In this case, I am just interested in being able to export the field with the correct number of decimal places.
But, I understand your warning about relying on the field for subsequent calculations.
Thanks again!