Expr1Type property: QueryCriteria class
Description
This property returns or sets the type for Expression 1.
Note:
You must set the type of expression for every new criteria.
The values are:
| Numeric Value | Constant Value | Description |
|---|---|---|
|
2 |
%Query_ExprField |
Field |
|
3 |
%Query_Expression |
Expression |
This property is read/write.
Example
The following is used to test the expression to determine the property to use to retrieve it:
&MyExpr1 = &MyCrtColl.Next();
If &MyExpr1.Expr1Type = %Query_ExprField Then /* Expression is a Field */
&OldExpr1Value = &MyExpr1.Expr1Field;
/* do processing */
Else /* Expression 1 is an expression */
&OldExpr1Value = &MyExpr1.Expr1Expression;
/* Do processing */
End-if;
The following is an example showing how to add a field for Expression 1.
/* add a new criteria */
&MyCriteria = &MyQuery.AddCriteria();
/* set the type of the first expression to be a field */
&MyCriteria.Expr1Type = %Query_ExprField;
/* add the field EMPLID from the ABSENCE_HIST record */
&MyField = &MyCriteria.AddExpr1Field("A", "EMPLID");