I am not sure why I am getting this error. I don't think there is any 'null' value coming back. I even checked with ifnull(paid_on,0) Values work fine if I list them as columns, but when I try to capture to compare and format another column, I get this error. Here is what I'm trying to do:
"TotalEst"=>array(
"type"=>"number",
"decimals"=>2,
"footer"=>"sum",
"formatValue"=> function($value,$row) {
// $tourID = $value; // or = $row["tourid"];
$tourID = $row["TotalEst"];
$tourName = $row["paid_on"];
$color = $tourID>=$tourName?"#718c00":"#e83e8c";
return "<span style='color:$color'>$".number_format($value)."</span>";
},
),
"paid_on"=>array(
"type"=>"number",
"decimals"=>2,
"footer"=>"sum"
),
If I remove the formatValue clause, it works fine and it shows the TotalEst AND the paid_on. Why I can't access the TotalEst through $tourID = $row["TotalEst"]; and/or $tourName = $row["paid_on"]; Note: paid_o comes from the database select query, TotalEst is calculated using: ->pipe(new CalculatedColumn(array(
"TotalEst"=>function($data){
return ( $data["ETPlannerEst"]+$data["ETQuoterEst"]);
},
)))
what am I doing wrong? thank you