Calculated Fields

A field in a tstruct with its mode of entry as Calculate is a calculated field. A formula can be attached to a calculated field using the Expression property. At run time, the formula is evaluated and the result is populated in the field.

Points to remember

  • You can use any field name in the current TStruct that is before the current field in the formula as a variable.

 

  • Fields used in an expression are called parent fields. The field in which the expression is defined is called the dependent field. When parent fields are changed all its dependent fields are refreshed.

 

  • When a parent and dependent fields are both in the same grid, the parent value in the current row is used to refresh the dependent value in the current row.

 

  • When a parent field is non grid & dependent is in grid, all the values in the dependent column are refreshed.

 

  • When parent is in grid and dependent in non grid, when value of any row in the parent is changed, the value in the non grid is changed.

 

  • When a row is deleted in a grid DC, all the dependent non grid fields for every field in the grid are refreshed.