7.1.2 Extracting a Named Condition from a Table
To create a Named Condition by extracting simple conditions from an existing table, follow these steps:
1. Select a table in the Worksheet.

2. Click the 'Name Condition' button on the toolbar. This creates a new Named Condition containing the pre-aggregate conditions in the selected table. A graphical link indicates the table from which the condition was extracted.
Suppose that in a Data Worksheet you have a table listing all of the orders from the state of NY and that the table also has a pre-aggregate condition associated with it. Say the pre-aggregate condition is defined on the 'Discount' field so that only the orders that have a 'Discount' value of greater than '0.2' are included in the table. If you want to use this same pre-aggregate condition for other tables in the same Data Worksheet or for tables in other Data Worksheets, you can create a Named Condition and save it in the Asset Repository. Follow these steps:

1. Create a new Worksheet.
2. Expand the 'Data Source' node, the 'Orders' node, and the 'DWS' node.
3. Drag the 'NY Orders' query onto an empty cell on the Worksheet. A new table, 'NY Orders1', is created.

4. Click on the 'Condition' button, located in the title row of the table. This opens the 'Condition' dialog box.
5. In the 'Condition' dialog box, click the 'More' button to create a new condition.
6. Using the menus, define the condition as follows:
[Discount][is][greater than][0.2]

7. Click on the 'OK' button to close the 'Condition' dialog box.

8. Select the table by clicking on its title row, and press the 'Extract Condition' button in the top toolbar. This extracts the pre-aggregate condition on the 'NY Orders1' table into an external condition object, 'Condition'.

The link between the table and Named Condition indicates that the condition is used by the table. Deleting this link will remove the condition from the table.
9. Rename the condition object to 'Large Discount'. Follow the steps below:
a. Right-click the 'Condition' object and select 'Properties' from the context menu.
b. In the 'Name' field, enter 'Large Discount', and click 'OK'.
10. Set the 'Large Discount' Named Condition as the Primary object of this Worksheet: Right-click its title and select 'Set as Primary' from the context menu.


11. Click on the 'Save' button, located in the top toolbar.
12. Save the Data Worksheet as 'LargeDiscount', and select 'Global Worksheet' as its scope.

13. Click 'OK' to add the Named Condition to the Asset Repository. Notice that the name of the asset on the asset tree has a “condition icon” indicating that the asset is of the 'Named Condition' type.

This example is continued in Using a Named Condition with an illustration of how to apply the Named Condition to a table in a different Worksheet.
See Also
Defining Simple Conditions, for instructions on how to add new conditions.
Setting an Asset as Primary, for details about marking an asset as Primary.
| << 7.1.1 Creating a New Named Condition | © 1996-2013 InetSoft Technology Corporation (v11.4) | 7.2 Creating a Named Grouping >> |