When you specify an event condition, you describe a specific occurrence of data items that an agent must detect before it performs its tasks. The event condition is a query expression that you create using items from the package.
For more information, see Example - Specify an Event Condition.
If you want to include parameters or calculations
in
the event condition, you must create them before you define the event.
From the Actions menu, click Specify
Event Condition .
Create a detail expression, a summary expression, or both:
If you want part of the event condition to apply to values of individual source items, click the Detail tab and follow step 3.
If you want part of the event condition to apply to aggregate values, click the Summary tab and follow step 3.
In the Expression box, create a query expression:
Drag items from the source tab or type text directly.
Drag operators, summaries, and other mathematical functions from the functions tab or type text directly.
Tip: To see the meaning of an icon on the functions tab, click the icon and read the description in the Information box.
If you want to insert a parameter , drag it from the parameters tab.
If you want to insert a calculation , drag it from the data items tab.
Insert values if required.
Tip: To select from a list
of possible values for the selected item, click the select value
button . Move the values you want from the Select Value box
to the Selected Items box and click OK.
For example, you can type the following expression:
[Unit price] * [Quantity sold]> 5000
To check the event list to ensure that you specified the event condition correctly, from the Actions menu, click Preview.
To determine how many event instances there are, from the Actions menu, click Count Events.
From the File menu, click Save As .
Specify a name and location for the agent and click OK.
You can preview the event list returned by the event condition. For more information, see Preview the Data.
You can define a parameter and include it in an event condition. When the agent runs, it prompts the user to enter a value for the parameter. You can also use parameters to accept the results of a previous agent.
For more information, see Example - Define a Parameter.
From the Insert menu, click Parameter .
In the Parameter name box, type a name for the parameter.
Click OK.
The parameter appears in the data items tab.
You can include the parameter when you specify an event condition Example - Define a Parameter.
A calculation is a query expression that defines an arithmetic combination of data items. For example, you can define a calculation named Product Sales that is the product of the unit price and the quantity sold.
For more information, see Example - Define a Calculation.
From the Insert menu, click Calculation .
In the Name box, type a name for the calculation.
In the Expression box, define the calculation:
Drag items from the source tab or type text directly.
Tip: If you type the text, you must include the full path of each data item. For example, you can type the following expression:
[gosales_goretailers].[Orders].[Unit price] * [gosales_goretailers].[Orders].[Quantity]
Drag operators, summaries, and other mathematical functions from the functions tab or type text directly.
Tip: To see the meaning of an icon on the functions tab, click the icon and read the description in the Information box.
Insert values if required.
Tip: To select from a list
of possible values for the selected item, click the select value
button . Move the values you want from the Select Value box
to the Selected Items box and click OK.
Click OK.
The calculation icon appears on the data items tab.
You can include the calculation when you specify an event
condition or
specify a task.