Vconstrain
See Also: Constrain, Constrained_Clear, Constrained_Find, Vfind
Purpose
To provide constraints in programs when column and column parameters must be passed as integers instead of names. This command is usually not used when working with Data Dictionaries.
Syntaxes
vconstrain
child_tableNum
relates
parent_tableNum
vconstrain
tableNum
as
boolExpression
vconstrain
tableNum
columnNum
mode
expression
vconstrain
tableNum
columnNum
mode
tableNum2
columnNum2
Argument Explanation
- child_tableNum: The number of the child table.
- parent_tableNum: The number of the parent table.
- tableNum: The number of the table to be constrained.
- columnNum: The number of the column to be constrained.
- boolExpression: An expression that is treated as false if it evaluates to zero, true if non-zero.
- expression: Any DataFlex expression.
- tableNum2: Number of the table to be constrained to.
- columnNum2: Number of the column to be constrained to.
- mode: One of the following symbols:
lt,le,eq,ne,gt,ge,contains, ormatches. Or an expression that evaluates to their symbolic values (contains = 7, matches = 6).
What It Does
Vconstrain works similarly to constrain, except that the constraint's table and column parameters are passed as integers instead of names. This allows you to define these table and column values at runtime instead of compile-time.
This command would most often be used within functions or procedures where the constraint values are passed as integer parameters.
Procedure BuildConstraint integer iTile integer iColumn
vconstrain iTile iColumn gt 100
End_Procedure
This is an advanced technique. In most programs, you will use the constrain command to build your constraints.
See the constrain command for more information on the different types of constraints.