add generated column to table view with a hooks file?

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
cnaome
Posts: 2
Joined: 2021-11-27 12:48

add generated column to table view with a hooks file?

Post by cnaome » 2025-04-08 05:58

Hello

Is it possible to generate an additional colomn in the table view using a hooks file?

I added code to the init() function. I can see the column but there is no data (in any of the columns...) My SQL code gives a result in the database.

I added my new column to:

$options->QueryFieldsTV
$options->ColFieldName
$options->ColNumber
$options->ColWidth

I can do this with a view but I wonder if it possible with a hooks file? If so, what are the steps to make it happen?

Thanks!

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1709
Joined: 2018-04-01 10:12

Re: add generated column to table view with a hooks file?

Post by pbottcher » 2025-04-10 19:19

Hi,

from my knowledge, you need to adjust the template used to generate the TV, otherwise you will be able to add a column, but no data will be displayed.
Maybe you can explain what you try to achieve. Why cant you just add a field to the table?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply