Using a calculated field for an Auto-fill lookup.
Posted: 2024-02-07 07:20
This might be a known condition; I couldn't find anything after some searching on the forum.
I tried to use a calculated field from one table as an auto-fill lookup in another. I can get other fields to auto-fill from the same relationship, just not my calculation, which sums values from another table.
As a workaround, would there be a way I could copy the calculated value into a non-calculated field leveraging the hooks file? Would some update command to save the value to the database?
Would this be how I would do that?
Thanks for any guidance.
Kevin
I tried to use a calculated field from one table as an auto-fill lookup in another. I can get other fields to auto-fill from the same relationship, just not my calculation, which sums values from another table.
As a workaround, would there be a way I could copy the calculated value into a non-calculated field leveraging the hooks file? Would some update command to save the value to the database?
Would this be how I would do that?
Code: Select all
function Catalog_after_insert($data, $memberInfo, &$args) {
$data['ValueStatic'] = $data['ValueCalculation']
return TRUE;
}
Kevin