Page 1 of 1

Add Incremental using QueryFieldsTV

Posted: 2022-03-10 12:23
by globaldrip8
Hi
pls help i want to modify table view that show

this is what i write but not work

Code: Select all

$old_options = $options->QueryFieldsTV;
foreach($old_options as $field => $caption){
        
        if($field == '`table`.`field`'){
            $number=1;
	    foreach (range(1,100) as $number) {
	    $new_options[$number++] = $caption;}
        }else{
            /* Keep all other fields as-is */
            $new_options[$field] = $caption;
        }
         
        $options->QueryFieldsTV = $new_options;
    }
but didn't work
thank you

Re: Add Incremental using QueryFieldsTV

Posted: 2022-03-11 15:01
by landinialejandro
to change the captions of the fields in the table view need to use $options->ColCaption.

example:
$options->ColCaption = ['Contacto', 'Monto', 'Mes', 'Nombre', 'Rango', 'Proxima fecha de pago', ];