The Query Condition form guides you through building your Query Filter Conditions. There are four types of Query Filter Condition; Fixed Value, Required Value, List of Values and Expression. A Fixed Value is a value that is permanently in your Query and is used every time the query runs. A Required Value Condition is one that prompts the user to enter a value when the Query is run. A List of Values is effectively a List of Fixed Values. An expression is a value that is evaluated using an expression each time the query runs.
AND or OR... You can choose whether each of your Conditions has an 'AND' operator or an 'OR' operator. If you said you wanted to list all Customers "where Country is equal to USA AND Country is equal to UK" then you wouldn't get any results as it would not be possible for the Customer Country to be equal to 'USA' and equal to 'UK' at the same time. However, if your conditions specified customers "where Country is equal to USA OR Country is equal to UK" then you would get a list containing all the Customers in the USA and the UK, because you would be asking for all the customers where Country = USA or UK.
| |
FIXED VALUE CONDITION
Use the 'Operator' combo box to determine whether this will be an 'AND' condition, or an 'OR' condition.
Then use the 'Field' Combo box, to select the Field that you wish the Query Condition to be built on.
Then select the appropriate Qualifier.
Click on the 'Fixed Value' radio set button to enable the Fixed Value text box.
You can then enter the value that the selected field will be compared against when the Query is run.
| |
A Required Value is one that the user is required to enter at run time.
As with a Fixed Value Condition select the field that you wish your condition to operate on.
Click on the 'Required Value' radio set to enable the Required Value Name and Description text boxes.
Enter a Required Value Name and description in the relevant text boxes.
The Required Value Name is the Name or Label that will be displayed when the user is prompted for a value at run time. | |
The Required Value Description is a description or help message that is displayed at run time to help the user understand what input is required.
By putting a tick in the 'Mandatory' check box you can determine whether the user must input a value at run time. | |
LISTED VALUES CONDITION
A Value List Condition is a list of Fixed Values which operates like an 'OR' statement.
Select the field and qualifier and then 'List of Values'. Type the value you wish to be included in the list, in the 'Fixed Value' text box, and then click on 'Add' to transfer it into the list.
To remove a value from the list, click on it and then on 'Delete'.
The List of values operates like an 'OR' statement i.e. if the field 'Country' is equal to USA OR equal to United Kingdom OR equal to Australia.... | |
EXPRESSION CONDITION
An Expression Condition is a condition that is a condition that evaluates to an expression.
As with a Fixed Value Condition select the field that you wish your condition to operate on.
Click on the 'Expression' radio set to enable the Expression text.
Enter an expression, or generate using the column and function options, that will be evaluated when the query is run.
If your query is running on a Progress AppServer System, your expression should be a valid Progress Expression or Operator. If your query is running on an SQL System your expression should be a valid SQL expression.
The Check Syntax button will check that the expression is valid before leaving the screen | |
If the system is configured to allow it, you can change the lookup assigned to a condition using the Lookup Options button. Press the Lookup Options button to open the Lookup Details dialog box.
Note you can the Preview Data button in this screen to preview a sample of data the field contains. | |
Once your Condition is specified, click 'OK' to return to the Query Wizard - Define Filter Condition form where it will be displayed in the list view. |
Progress Expressions
The following list details initial information of some Progress Expressions that can be used. Additional information is available at OpenEdge ABL Reference
|
Progress Operators
The following list details initial information of some Progress Operators that can be used. Additional information is available at OpenEdge ABL Reference
Operator | Description | Usage |
+ | Adds two numeric expressions | expression + expression expression |
+ | Joins two character string or expressions | expression + expression expression |
+ | Adds a number days to a date | date + days date days |
- | Subtracts a numeric expression from another | expression - expression expression |
- | Subtracts a number of days, or a date, from a date | date - days date days |
* | Multiplies two numeric expressions | expression * expression expression |
/ | Divides one numeric expression by another numeric expression | expression / expression expression |
AND | Returns TRUE if each logical expression is true | expression AND expression expression |
EQ = | Returns a True value if two expressions are equal | expression EQ expression expression |
GE >= | Returns a True value if the first expression is greater or equal to the second | expression GE expression expression |
GT > | Returns a True value if the first expression is greater than the second | expression GT expression expression |
LE <= | Returns a True value if the first expression is less then or equal to the second | expression LE expression expression |
LT < | Returns a True value if the first expression is less than the second | expression LT expression expression |
NE <> | Returns a TRUE value if two expression are not equal | expression NE expression expression |
NOT | Returns TRUE if the expression is false and FALSE if the expression is true | NOT expression expression |
OR | Returns a TRUE value if either of two logical expression are TRUE | expression OR expression expression |
Lookup Options
The Lookups Options screen allows you to define which lookup is used for any conditions on a specific field in your query.
| |
To specify the lookup, select the lookup in the drop down list and press OK. If you do not want a lookup applied to this field, select "<No lookup selected>". If you have the relevant permissions, you can create a new lookup by pressing the Add Lookups button to open the Lookup Wizard.
| |
Once you have selected your lookup options, press OK to continue. |