Additional Criteria in Query Forms

On the Additional Criteria tab of a query form, you can specify search criteria for any of the fields on the associated multiview form.

Note: This tab includes the fields that are listed on the Primary Criteria tab. This means that you are not obligated to specify primary criteria before doing a query. See Primary Criteria in Query Forms.

One reason for using the Additional Criteria tab for the principal fields, rather than using the Primary Criteria tab is if you want to do a Boolean OR search, rather than a Boolean AND search on those fields. The Primary Criteria tab only allows AND searches.

Query Clauses

Query criteria are made up of query clauses. A query clause consists of a Boolean search delimiter, a field name, an operator, and a value. For example, to retrieve records for vendors located in New York, you would create a clause similar to the following:

AND State = 'NY'

where

  • State is a field name on the multiview form in which vendors are defined in your system.
  • = is an operator specifying that returned results must match the value exactly.
  • NY is the value that you want the system to search for in the State field.
Note:  The letter N might be shown between the operator and the value in the clause. This N indicates that the system is using Unicode (double-byte) character codes.

Multiple clauses, if you use them, work sequentially. That is, the system searches using the first defined clause, then applies the second clause to the returns, and then the third clause, and so forth. This means that the order in which you define your clauses must be planned carefully, as order can make a difference.

AND and OR (Boolean) Searches

You can create multiple clauses and join them by Boolean AND or OR filters. Clauses joined by AND retrieve only those records that meet the criteria specified in all clauses. Clauses joined by OR retrieve records that meet any one of the criteria.

The system adds the Boolean filter automatically when you define the query clause. If you select the check box labeled OR instead of AND with previous clause, the clause is defined as an OR clause. If that check box is cleared, the system defines the clause as an AND clause.