Format numeric data within cell

Max82

New member
Hello,

I've been looking through the posts and I've had no luck in making numeric content display with two decimal points. For example:

1231.1

Displays as 1231.10

I know how to do this with a function in PHP but am lost as to how to do it in this application. Thanks for any help you can provide.
 

DebbieS

DaDaBIK Guru
If you have your field set to numeric through the admin interface, you can update that in business_logic ... in the field_correct_display function, under the default: part, add a section for the numeric stuff:

elseif ($field_content == "numeric"){
$field_to_display = "code to format the number".$displayed_part."additional code if needed";
} // end if

I'd plunk it in there just after the email one.

I've not tested it but it should work.

 

Max82

New member
Thanks Debbie,

I've been playing with exactly that, just trying to work out the coding details. I'll post the results once I get it squared away.

BTW here are the stats on my setup:

PHP 5.2.12
MySQL 5.0.85
Apache 2.0.63
Version 4.2
 
Top