Hi,
if you want to "learn" the hooks capabilities, here another option that you may try.
In the hook/TABLENAME.php -> _init function you have the $options object that gives you a lot of capabilities for manipulating the way appgini will handle the different settings/parts.
Within the QueryFieldsTV array you will find the fields that are displayed in the TV and how they are build. See
https://bigprof.com/appgini/help/advanc ... ist-object
So in your case you can try to adopt the display of the titre field like this:
Code: Select all
$ar=array_flip($options->QueryFieldsTV);
$ar['FIELDNAME']='concat(`TABLENAME`.`FIELDNAME`," (",(YOUR_SELECT_STATEMENT where t.LOOKUPFIELD='.$options->PrimaryKey.'),")")';
$options->QueryFieldsTV=array_flip($ar);
Replace the TABLENAME, FIELDNAME and YOUR_SELECT_STATEMENT with your appropriate data. You may need to adjust the
YOUR_SELECT_STATEMENT where t.LOOKUPFIELD='.$options->PrimaryKey.'
if you have a more complex statement with additional WHERE clause parameters.
This is basically similar to the calculated field approach, but does not create a new field.