Specifying a Data Filter for a Data Source
A data source in a Rule, Agent, or Web Service can be filtered and sorted using one of several methods. A data source in a Task can be filtered in the publication of the task.
To filter and sort a data source, select the data source, and click the Data Filter tab.
Filtering
Select how to filter a data source from the following methods:
None (no objects will be selected) | No objects will be selected for the data source. Select this option if data are read using an effect, for example if data are imported from a file. |
Default | Only available when filtering data for data sources of type Report. Select this option if you want to keep the default data filter defined in the Report. |
Set equal to active user account | Only available when filtering data for a data source that is associated with a Account Profile, for example Person. Populates the data source with the object associated with the user that is signed in when the action is executed. |
Two-way binding to objects selected from the context | Only available when publishing a Task or defining a Report Link. When running a Task or opening a Link, the objects selected by the user are sent as input to the Task or Link. Selecting this option connects the data source directly to the objects selected by the users, and gives you the opportunity to exeute context sensitive actions. |
Get objects from the clipboard | Populates the data source with data placed on the clipboard. See copy and paste data for examples. If the data source is of type General File or File Folder, click Reject files of type if you do not want to include all files placed on the clipboard. For example, you may want to process mail messages in a separate data source of type Mail Message. |
All objects | Populates the data source with all objects of a given type, for example all Product Categories. |
One-way binding to objects in the data source | Only available when filtering data in the Run a Task effect. Populates the data source in the task that is called with the same objects as a data source in the current task. If the task that is called makes changes to the data source while executing, this is not reflected in the data source used for filtering. |
Two-way binding to objects in the data source | Only available when filtering data in the Run a Task effect. Populates and binds the data source in the task that is called with the objects in a data source in the current task. If the task that is called makes changes to the data source while executing, this is reflected in the data source that is bound. |
Select a specific set of objects | Populates the data source with a static selection of objects, for example a selection of Product Categories. |
Select a saved search | Only available when distributing reports. Select this option if a saved search is to be used as a filter for your report. |
Select objects which meet the condition | Populates the data source with a dynamic selection of objects which satisfies a condition, for example all employees working in a department. Follow the instructions in the step-by-step procedure on how to define a condition. To read the objects from another data source instead of from the database, select the Read Objects from Data Source check box. In the Read Objects from Data Source list, select which data source to read objects from. |
Select objects which meet one of the conditions | Same as the option above, but gives you the opportunity to define one or more filter conditions with a conditional statement. The conditional statement determines which filter condition to apply. |
Sorting
You can control the way objects are sorted and the number of objects to read when data are filtered. You might want to process data in a certain order, or only process objects with the highest or lowest values within a range, such as candidates with the top 10 grades or products with the bottom 5 sales amounts.
To sort data, do the following:
- In the Sort By box, click Modify.
- In the Sort objects by list, click a field.
- To sort in ascending alphanumeric order, click Ascending. To sort in descending alphanumeric order, click Descending.
- To sort by an additional field, click a field in the Then by list.
To limit the number of objects to read, click Read the first object(s) and then do one of the following:
- Click in the Read the first object(s) field and in the menu, click Enter a number or press F2 and then enter a value.
- To select a field from one of your data sources, in the Read the first object(s) field, click Select field or group. In the Select Field or Group dialog box, select a field of data type Integer.