[ Selectors ]

Introduction #

This chapter describes the selector objects which are used to define subsets of the accounts and transactions in the Max2 system for various processing actions.

Selector Types #

There are three types of selectors in Max2:- Account Selectors, Trial Lesson Selectors and Transaction Selectors used to choose proper accounts, trial lesson accounts and transactions respectively.

Usage #

There are a number of places where selectors are used.

Reports #

The most important is in choosing which accounts or transactions are to be included in reports which are printed.

List Windows #

An account selector is used in the Main Window's Accounts | Selected Proper Accounts... command to indicate which accounts are to be shown in the Selected Account List window. Similarly, the Transactions | View Selected Transactions... command uses a transaction selector to control the display of the Selected Transactions window.

Processing #

Selectors are also used for some processing actions, for example, the Main Window's Transactions | Delete Selected Transactions... command uses a transaction selector to decide which transactions are to be deleted.

Persistence #

Max2 stores one copy of each of the three types of selector. Whenever a selection is specified it is stored in this global copy to be used as the default selection for the next operation.

This can be useful for checking a selection before using it to apply an operation. For example, a mistake in the selector specified for the Delete Selected Transactions command could be tedious to recover from. Therefore, it would be wise to do a View Selected Transactions... or Selected Transaction Report using the selector first to verify that the right transactions will be deleted.

When Max2 stops running the selectors are not saved. Therefore, next time Max2 is run the selectors will return to the default state.

Default Selectors #

The general principle is that the default state for all selectors is to select all objects of the relevant type.

However, by default the transaction selector does not select deleted transactions. If deleted transactions are to be included in the selection then this must be specified explicitly.

The menu at the top of the selector windows includes a Standard Selections item which contains commands to set the selection back to the default state and to some other commonly used settings.

Selector Specification #

Selectors are specified by filling in forms which are displayed when operations requiring them are chosen.

Selector Parts #

Selectors are divided into parts which specify different attributes of the objects to be tested in making the selection decision. For example, here are two parts from the Account Selection window:

The first of these parts tests the amount of aerotow height that the account is in credit by. The second tests the month of the most recent transaction for the account.

Each selector part is surrounded by a box (technically, this is called a frame) with its title inset into the top edge.

Part Combination #

For an object to match a selector it must match all of the parts. If an object fails to match any part then it is not selected.

Selector Check Boxes #

Many selector parts contain check boxes which indicate which test results are to cause the relevant object to be included in the selection.

A typical example is the Course Aerotow Balance part shown above. This contains a height, in feet, against which each account's aerotow balance is to be compared. Depending on the result of the comparison, one of the check boxes is used to indicate whether the account is to be included in the selection.

As shown above, all accounts will be be selected - at least as far as aerotow balance is concerned. Suppose we wanted to print a list of all accounts with 30,000ft or more of aerotow credit. Then we would fill in this part as follows:-

This says that if the account's aerotow credit balance is more than 30,000ft then the first check box indicates that the account is to be included. Similarly, the second check box says that if the aerotow credit is exactly 30,000ft then the account is also to be included but the third check box says that if it is less then the account is not to be included.