i am trying to enter this code to get a different color for each state.
It doesn't work, it clears my table data leaving the page blank.
Using AppGini 5.94
}
function slot_init(&$options, $memberInfo, &$args){
// modify the status field of the table view query to display 'no' invoices in bold red
$oldArray=$options->QueryFieldsTV;
$options->QueryFieldsTV='';
foreach($oldArray as $field => $caption){
if($field=='`slot`.`slot_mag`'){
$options->QueryFieldsTV['IF(`slot`.`slot_mag`=\'betting da lavorare\', \'<b style="color: green;">BETTING DA LAVORARE</b>\', IF(`slot`.`slot_mag`=\'ATS da lavorare\', \'<b style="color: red;">ATS da lavorare</b>\', IF(`slot`.`slot_mag`=\'saci vlt da lavorare\', \'<b style="color: blue;">SACI VLT da lavorare</b>\', `slot`.`slot_mag`)))']=$caption;
}else{
$options->QueryFieldsTV[$field]=$caption;
}
}
return TRUE;
Could anyone help me to solve the problem?
Many thanks in advance.