I have a field (string type) updated via hook with the concatenation of two other fields (eg: fullname = name + " " + surname) and I want display it only in the table view, but if I mark the "Hide in detail view [check]" the hook functions does not update it (it does not change his value).
Is it possible ? Is there a workaround ?
ALex.
Update field not showing in detail view
Re: Update field not showing in detail view
Hi,
can you post the code you are using. Are you using a combined tableview+detailview?
can you post the code you are using. Are you using a combined tableview+detailview?
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.
Re: Update field not showing in detail view
Hi,
below the code in the table's hook:
It run perfectly except when the field "Nome_Completo" is hidden in detail view, in that case it does not appears in the detail view and does not change its content as it should do according with the table's hook commands.
The field "Nome_Completo" is a calculated field, so it is understandable that does not appears in the detail view, where the user believe believes to be able to modify it and can be confused.
ALex.
below the code in the table's hook:
Code: Select all
function AN_Software_before_update(&$data, $memberInfo, &$args){
$nome_var = sqlValue("select Nome_Completo from AN_Software_Base where Id='{$data['Prodotto']}'");
$data['Nome_Completo'] = ($nome_var . " Ver. " . $data['Versione']);
return TRUE;
}
The field "Nome_Completo" is a calculated field, so it is understandable that does not appears in the detail view, where the user believe believes to be able to modify it and can be confused.
ALex.
Re: Update field not showing in detail view
Hi,
this is the way AppGini works. If you set a field to read-only or hidden in the detail view, AppGini will ignore that field for the sql calls to the database.
So you will not be able to manipulate the field via the $data array.
You could update the database directly, as you have all information needed.
this is the way AppGini works. If you set a field to read-only or hidden in the detail view, AppGini will ignore that field for the sql calls to the database.
So you will not be able to manipulate the field via the $data array.
You could update the database directly, as you have all information needed.
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.
Re: Update field not showing in detail view
Ok, thanks
ALex.
ALex.