Defining filters on a type

If you have defined the structure of an entity or link type but only a subset of records in the tables are applicable to the type, you must define the conditions for when a record will be used in the type. For example, in the Accounts Example 3 database, if you want to define three account types all originating in the Account table, you will need to set the conditions to distinguish each type.

To add type filters:
  1. Click on the Filters tab on the Type Structure dialog.
  2. All of the fields used within the type are listed in the grid so you can add conditions to any of these fields. Click in the required grid box and click Browse to display the Field Condition dialog.
  3. Enter the conditions you require and click OK.

    The origin of the field currently selected in the grid is displayed in the Field details area below the grid. This may help to determine what conditions you need to apply.

    You can add conditions on as many fields as you like, but only one condition per field. If you add conditions on multiple fields, all of the conditions must be met.

    You can also define a filter by setting the status of a relationship on the Structure page to be Acts as a Filter. This means that the relationship itself acts as a filter. For example, in the Accounts Example 3 database, there are three tables involving transactions: Transactions, CreditCardPayment and CheckPayment. Data for all transactions appears in the Transactions table and the remaining two tables provide more information for each transaction type. When defining the type Check Transaction, the Transactions and CheckPayment tables will be used in the type structure. The relationship between these tables can act as a filter to use only the subset of records in the Transactions table that are also found in the CheckPayment table, that is transactions of type Check. Defining a relationship to act as a filter means that you do not have to define the filter of the Filters page.

    To define a relationship to act as a filter, right-click on the relationship and select Acts as a Filter. The relationship line will become red.