ComponentOne True DataControl 8.0
MessageExpression Property (Constraint)

Specifies the expression evaluating to the message text that is shown when a constraint is not satisfied.

Syntax

Constraint.MessageExpression = variant

Remarks

Read/Write at run time and design time. Property applies to Constraint object.

When a constraint check fails (ConstraintExpression evaluates to False), this expression determines the message text describing the reason of the failure. The MessageExpression is evaluated and the result is used as the error message text. It is first passed as the Description argument to the Error event. If the Error event procedure does not cancel the message, the text appears in the standard error message box.

If this expression is empty or evaluates to empty string, TData displays a generic “Constraint violation” message.

See Validation and Constraints for more information on constraints.

See True DataControl Expressions for more information about expressions in general. Evaluation rules for MessageExpression are as follows:

Expression Level: Record level

Synchronous Evaluation: Evaluated on constraint violation, before the Error event is fired.

Asynchronous Evaluation: No action.

 

 


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

Product Support Forum  |  Documentation Feedback