Add Incremental using QueryFieldsTV

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
globaldrip8
Posts: 27
Joined: 2015-12-19 03:59

Add Incremental using QueryFieldsTV

Post by globaldrip8 » 2022-03-10 12:23

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

User avatar
landinialejandro
AppGini Super Hero
AppGini Super Hero
Posts: 126
Joined: 2016-03-06 00:59
Location: Argentina
Contact:

Re: Add Incremental using QueryFieldsTV

Post by landinialejandro » 2022-03-11 15:01

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', ];
Alejandro.
AppGini 5.98 - Linux OpenSuse Tumblewweed.

Some of my posts that may interest you:
:arrow: Landini Admin Template: Template for Appgini like AdminLTE
:arrow: Profile image plugin: add and changue image user profile
:arrow: Field editor in table view: Configurable fast edit fields in TV
:idea: my personal page

Post Reply