If you want to build more complicated expressions, using the various comparison operators that are available, you can use the Advanced Filter/Sort Window. In this window, you specify a condition that the records must meet. You can select records based on one condition or as many conditions as you want; you link the conditions with the AND or OR option. In the sort window you can sort your records in ascending order by some fields and in descending order by others,
To define an advanced filter/Sort:
Click Advanced in the Sort & Filter group on the Data Tools tab.
The Advanced Filter/Sort window opens.
Specify a filter condition on the first screen of the Wizard. For mor information see Advanced selections.
Click Next to activate the second screen of the Wizard where you can specify a sort condition. For mor information see Advanced sorts.
Click Finish.
FlexMail will return to the active view and applies the filter and sort specified, showing only the records that meet the condition in the specified order. To return to your project without applying the filter and sort, choose the Cancel button.
To build an advanced filter:
Specify a condition that the records must meet to be displayed by filling out the following items:
Field. Select the field from your database on which the selection is to be based.
Operator. Specify the type of comparison you want to make against the value in the Value box. For example, if the Value box contains 500, you could select records that contain fields equal to 500, less than 500 and so on.
Value. Specify the value against which you want records to be compared. Surround the values by single quotes ( ' ) if you are comparing strings. To specify date and time criteria for a comparison, you supply a date or time value. This value must be enclosed in number signs ( # ).
In connection to most operators you may only specify one single value. However, there are two exceptions: when the comparison is 'is (not) one of' you may enter a list of values, separated by commas; when the comparison is '(not) between' you have to enter two values separated by AND.
Two operators, LIKE and NOT LIKE, can be used to make matching searches based on wildcard characters in the value. When you select one of the comparisons 'like', 'contains', 'begins with', or 'ends with', they will translate to the operators LIKE and NOT LIKE with the appropriate wildcard characters added to the entered value. Use the asterisk ( * ) to match any number of characters or the question mark ( ? ) to match any single character.
Case Sensitive. When switched on, this check box causes FlexMail to distinguish between upper- and lower case letters when making comparisons.
Choose Add to add the condition to the Filter list in the dialog.
To specify additional conditions, fill out the dialog box again. Note that the Connection box is now enabled, with the choices 'And' and 'Or'. You have to select a connection for all second and subsequent definitions of a condition.
Select And if you want to display a record only if it meets the previous condition and the new condition you are adding. Select the Or button if you want to display records that meet all previous conditions or meet the new condition you are adding.
If you add more than two conditions, FlexMail first evaluates the conditions connected by an 'And' relation and then applies the 'Or' relations.
NOTE: You can influence the order in which multiple conditions are evaluated by adding brackets ( '(' and ')' ) around the conditions that should be evaluated together.
To build an advanced sort:
Specify your sort expression by specifying the following items:
Select a field on which you want to sort Click on the Fields box in the Expression group and select a field on which you want to sort data. For example, if you want to sort records by town, specify the field that contains town names.
Select the sort order for the selected field:
Click Add to add the field to the Sort keys list. If you have selected Descending, FlexMail will add DESC after the field name.
Repeat the previous step to add as many sort keys to the sort as you want. FlexMail will add the condition after the line in which the cursor is located in the Sort keys list.