ComponentOne True DataControl 8.0
True DataControl Expressions

True DataControl expressions are nonprocedural rules that describe application logic. You construct expressions composed of fields, parameters, operators, and functions; at run time, True DataControl evaluates these expressions on an as-needed basis to perform a variety of tasks.

Every expression is a property of an object in one of the True DataControl collections: Fields, Parameters, RangeConditions, Constraints, PropertyExpressions, FilterExpressions. They can be set at design time, in True DataControl property pages, or, just like any other object properties, they can be set at run time in code with the corresponding property.

At design time, all expressions are specified using the True DataControl property pages. You can either type an expression in its entirety, or use the True DataControl Expression Editor to build it as depicted in the illustration:

Different collection objects, and, correspondingly, different property pages, are used to specify different kinds of expressions, as shown in the following table:

Parameter

Parameters page: Value expressions for parameter variables

Field

Fields page: Calculated field expressions, default expressions for new field values, range conditions, field-level constraints, message expressions for constraint violations

PropertyExpression

Property expressions page: Value expressions for properties of controls on the same form

FilterExpression

Filters page: Filter expressions

Constraint

Constraint page: Record-level constraints, message expressions for constraint violations

For example, when you create a calculated field, you assign it an expression that specifies how its value depends on other field values. At run time, True DataControl evaluates the expression and updates the calculated field as needed, such as when the current record position changes or the user modifies one of the fields upon which the calculated expression depends. If a calculated field is defined in terms of another calculated field, True DataControl automatically resolves evaluation order dependencies.

Additionally, for almost every kind of expression, True DataControl fires an event that you can handle to override the normal expression evaluation. For example, you can use the Filter event to impose complex filter conditions that cannot be specified by True DataControl expressions.

See Also

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback