Query Condition

Top  Previous  Next  

 

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.

 

clip254

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.

 

clip255

REQUIRED VALUE CONDITION

 

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.

clip256

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....

clip257

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

clip258

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.


Copyright © 2003-2017 DataPA Limited, all rights reserved. DataPA OpenAnalytics 6.0