TTdbFieldDef.Expression
TTdbFieldDef
Top 


Holds the expression if the field is calculated.

property Expression: string;

Description
Use Expression to specify a calculated field in a TurboDB table. Calculated fields are physically stored in the table but cannot be edited. Instead they are calculated each time the record has changed.

Example
The following adds a field definition to calculate the product price including 16% taxes:
with TdbTable1.FieldDefsTdb.Add('Price', dtFloat) do Expression := 'NetPrice * 1.16';