Title
keeping a decimal point to 2 characters
Post
eg $12.95 instead of $12.9555555555555 need to know the calculated script to make this not go beyond 2 decimal points.
keeping a decimal point to 2 characters
eg $12.95 instead of $12.9555555555555 need to know the calculated script to make this not go beyond 2 decimal points.
Is this table or list view in your example?
If table view, enter layout mode and make sure that the number field is actually present on your layout so you can give it a data format.
You can use the field tool to add it to the layout if it's not there when you select layout mode.
Use data formatting on the Inspector's data tab to specify currency with two decimal places and 12.955555555555 will then be displayed as $12.96.
Note that the value should, in any case I can think of, round to 6, not 5 in the penny column. If you really need to simply truncate the extra digits, you'll need to use a calculation field to do it.
all the data options are entered correctly. this has to do with the calculated value to display right. and i just need to know what option to put in there: case function floor function, etc
this is what the php code says from the backend but i know you should be able to set a calculated value instead of going thru the backend to fix...
<td class="browse_cell right">
<?php echo nl2br( $record->getField('Asking Price', 0) )?> </td>
For just using Filemaker, not publishing to the web, those are the correct settings. IF you are using custom web publishing with PHP to publish to the web, you'll need to either figure out the php code to format your data--not something that I can do or define a calculation field that properly rounds and formats your data.
Something like:
"$" & int ( Numberfield ) & "." & Left ( Filter ( Mod ( Round ( Numberfield ; 2 ) ; 1 ) ; 9876543210 ) & "00" ; 2 )
Is this table or list view in your example?
If table view, enter layout mode and make sure that the number field is actually present on your layout so you can give it a data format.
You can use the field tool to add it to the layout if it's not there when you select layout mode.
Use data formatting on the Inspector's data tab to specify currency with two decimal places and 12.955555555555 will then be displayed as $12.96.
Note that the value should, in any case I can think of, round to 6, not 5 in the penny column. If you really need to simply truncate the extra digits, you'll need to use a calculation field to do it.