Re: Calculated Fileds
Is this is a grid for a form?
Either case, create a ‘New Field’ in the list of fields. This is a calculated field (user defined)
You can then populate it as needed.
In a grid, onRecord event:
{calc_ext_price} = {qty} * {price};
In a form, use the same code in onLoad.
If you need to get the values from another table, then use sc_lookup in onInit to get the value and then populate the calc_field
pseudo:
$sql = ‘SELECT …’;
sc_lookup(tbl_lookup,$sql);
{calc_value} = tbl_lookup[0][0];
Use onInit to get values before form fields are populated. Use onLoad if you need to access existing form field values.
Regards,
Scott.