Calculated Fields

Back to index

see also Fields, DuplicateRecords


A calculated field is a normal field which has had a calculator attached.

Calculating Defaults

Specifying only use for Defaults

When you attach the calculator, specifying true as the second paramter to calculateWith() will cause the calculator to only be used for default values.

Another way to set this is to call useCalculatorOnlyForDefaults() after attaching the calculator.

Default Calculator Behaviour

A default calculator is used, instead of reading the value from the field:

  1. on a new record, with an empty field
  2. saving the value into the new record, if it is still an empty field

There is an important point here relating to user behaviour. If a default calculator is attached, it is effectively impossible to save an empty field on a new record. If the user strongly desires an empty field they can edit an existing record and remove the contents of the field.

 


Back to index


(c) Copyright A.D. Software 1994-1997 (All Rights Reserved).
Last Updated: 8th March 1997