Supported Constraint Variables

Previous Next

The following table lists all supported constraint variables that you can use in constraint messages.

Supported constraint variables

Constraint Type

Constraint Variables

SELECT

If an expression in the SELECT clause of a constraint has a label, then the following variable can be used:

 

Label.value

If this expression is a column then the following variables can also be used:

 

label.prompt

label.columnName

label.tableName

label.objectName

label.objectNamePlural

If the expression is a column without a label, then the following variables can be used:

 

table.column.value

table.column.prompt

table.column.columnName

table.column.tableName

table.column.objectName

table.column.objectNamePlural

where "table" is the table name or alias, and "column" is the column name.

Expressions in the SELECT clause without a label that are not a column, can not be referred to in the message.

It is not possible to refer to columns mentioned in the SELECT statement of a subquery of a constraint.

INSERT

For all columns of the record inserted, the same variables can be used as for columns in a select list.

If the constraint statement is an INSERT INTO... SELECT statement, you can also use the variables from this SELECT statement, like in a SELECT constraint.

DELETE

For all columns of the table from which records are deleted, the same variables can be used as for SELECT or INSERT constraints, except for the value parameter:

 

table.column.before

UPDATE

For all columns of the updated table, the same variables can be used as for SELECT or INSERT constraints. In addition to this:

 

table.column.before

If the constraint statement has the form:

 

UPDATE ...

SET ... =  ( SELECT ... )

 

You can also use the variables from this SELECT statement, like in a SELECT constraint.

DOMAIN

For domain constraints the following variables can be used:

 

value

before (only for corrective domain constraints)

For domain constraints, the following meta information is variable information that is substituted with the information of the column to which the domain constraint applies:

Prompt

ColumnName

TableName

ObjectName

ObjectNamePlural

INVOKE

For constraints with an INVOKE statement, the values of Return- and Out-parameters of methods can be used:

 

component_name.method.parameter.value

A corrective constraint can manipulate more than one record at a time. Since only one constraint message is displayed each time a constraint is evaluated, referring to a particular record in a constraint message is not possible.

If variable constraint messages are used for a corrective constraint, only the values for the last manipulated record are displayed in the message.

 

See Also

Variable Constraint Messages