Selection criteria

Selection criteria determines which items are to be processed by AQL and is designated by the with or if modifiers. Without any selection clauses in an AQL sentence, every item in the file is eligible for processing.

Note: Due to interface optimization, the FSI eliminates some records before passing them back to VME.

For example:

Select  file if date > "30 Oct 2017" and if date < "1 Jan 2019"

could return

[401] 10 items selected out of 10 items.

when there are actually hundreds of items in the file.

Compound selection clauses are formed with relational operators. When two clauses are connected by an and, both conditions must evaluate to true for an item to be selected for processing. When two selection clauses are connected with an or, or no relational operator is specified between selection clauses, either condition may evaluate to true for the item to be selected for processing.

The value specified in the valuestring clause must match exactly with the stored value for selection to occur. For example:

list entity with city = "irv" city

Only those items that contain irv in the city attribute are eligible for processing.

Selection criteria limits the data that must be met. Multiple criteria may be established to limit data selection to meeting a certain set of limitations. These sets are established by the logical relational connectives.

An active list can be used by another select sentence to narrow down the resulting list. A list can be passed to another list until a save-list or any other AQL, TCL, or FlashBASIC command is invoked. For example:

select entity with state = "ny"
n items selected.
select entity with city = "syracuse"
m items selected.
list entity name city state phone

The previous series of sentences first selects all entity items in the state of New York (ny), then out of these selects all entity items in the city of Syracuse, and then outputs a columnar report of name city state and phone.


The AQL pre-processor is an enhancement to the Access query language used on D3. The pre-processor provides two major functions:

  • Adds the ability to use and define phrases that contain parts of AQL sentences.
  • Eliminates the requirement that explicit values be enclosed in quotation marks, except to resolve ambiguities.

The AQL pre-processor is enabled by changing the command definition in the master dictionary for any AQL commands pre-processing is desired. The pre-processor scans the input sentence, expands phrases and determines which words are values, then passes the sentence to the standard AQL compiler. In normal operation, the AQL pre-processor processes the input statement before the AQL compiler.