6.25 Calculated Fields
The calculated field type allows you to enter your own javascript commands that are stored and calculated on the server.
Rather than being "static" and stored in the database, these values are calculated in real-time and can be used to populate document templates with real-time information.
An example could be the calculation of UK VAT on a purchase. Whenever the case is loaded the value of the custom field will be calculated server-side and a figure returned with the UK VAT amount added.
As with other scripting features, Javascript is the used syntax. At its simplest, a user could enter a command like this:
function calc() {Case.CustomField("Purchase Price") * 1.2;}
Which would generate the UK VAT calculation field entered in the example.
On the front-end, this field type is read only so it cannot be edited directly by users.