Adding query exclusions (without)
A query exclusion specifies that the presence of a particular event prevents a match. A query can specify zero, one or more exclusions. An exclusion can include a filter and/or a range to limit which instances of the identified event prevent a match.
Note: The information on the options in the New Query Exclusion (without) dialog which is provided below also applies when you modify an existing exclusion in the Edit Query Exclusion (without) dialog.
To add an exclusion condition to a query:
2. In the Query Designer Conditions pane, click the down arrow next to the plus sign and select Exclusion (without). 3. In the New Query Exclusion dialog, in the Event Type field, select the event whose presence prevents a match. You can select only an event type that has been added as a query input. If the type you want to select is not listed then you must first add it as a query input.
For example, consider consecutive Withdrawal events that have different country field values. You want an alert when this occurs except when a TravelNotification event is received before the second Withdrawal event. In this case, select TravelNotification as the event type that prevents a match.
4. In the Name field, Query Designer displays a name that it automatically generates. This is an alias for the selected event and is unique across all aliases in the query. You have the option of using this alias in the next step.
5. In the field in the middle of the dialog, you can optionally specify a Boolean expression that limits which event instances prevent a match. In this Boolean expression, you can optionally refer to the alias that appears in the Name field. When the specified Boolean expression evaluates to true the presence of the specified event prevents a match. When this expression evaluates to false the presence of the specified event allows a match.
For example, you might want a TravelNotification event to prevent a match only when its date field has the same value as the date field of the first Withdrawal event. If the event aliases w1, w2, and t1 are used, the following Boolean expression defines the exclusion filter: w1.date = t1.date. When the date fields of the first Withdrawal event and the TravelNotification event have the same value then the presence of the TravelNotification event between two consecutive Withdrawal events will prevent a match and an alert will not be sent. When the date fields of the first Withdrawal event and the TravelNotification event have different values then the presence of the TravelNotification event between two consecutive Withdrawal events will allow a match and an alert will be sent.
6. At the bottom of the dialog, indicate when the presence of the selected event prevents a match. If you accept During the whole pattern, then you can select OK and you are done adding an exclusion. If the presence of the selected event prevents a match only when it is received In between specific events, then select that option and then select at least two events.
7. Click OK to save the query exclusion.
Query Designer displays the new exclusion in a row in the Conditions pane. Also, the new exclusion is immediately added to the source code as a without clause in the find statement. You can click the Source tab to view the exclusion in the source code. Any changes you make in the Design tab are reflected in the Source tab, and vice versa.
To modify the exclusion, select it in the
Conditions pane and then click the
Edit icon.
To remove the exclusion, select it in the
Conditions pane and then click the
Delete icon
.