6.6.2 Querying a Text Data Source
Walkthrough
A text query specifies how the text file defined by the data source should be converted into a table. To create a query for the 'OldCRM' test data source, follow the steps below:
1. Click the 'New' button in the Style Studio toolbar. This opens the 'New Asset' dialog box.
2. In the left panel, select the 'Query' node. In the right 'Types' panel, select the 'OldCRM' data source, and click 'OK'. This opens the 'Query Wizard' dialog box.
3. Select the General tab. In the 'Name' field, enter the following query name: “Customer_List”.
4. Select the Source tab (if enabled). Choose one of the requests that you have defined in the data source definition. (See Text Data Source for more information.)
5. Select the Fields tab. Choose the database fields you want to include in the query.

6. (Optional) Select the Condition tab. Click a node in the tree to filter, and press the 'Add' button. For example, to select records for a particular state, select the State field.
7. Use the menus to specify the first part of a condition. For example:
[State][is][equal to]

8. To use a value in the right-hand side of the condition, click the “arrow” button at the right side of the condition, and select the 'Value' option. Then enter the desired value in the text field.
9. To use a variable in the right-hand side of the condition, click the “arrow” button at the right side of the condition, and select the 'Variable' option. In the adjacent 'Name' field, enter a name for the parameter.
This is the name (case sensitive) by which you will refer to the parameter in hyperlinks, scheduled tasks, scripts, etc. If the condition operator is “one of”, then the variable represents an array. Otherwise, it is a scalar value.
10. To use session data in the right-hand side of the condition, click the “arrow” button at the right side of the condition, and select the 'Session Data' option.

Note that the adjacent menu automatically chooses the 'equal to' or 'one of' operator to match your selection.
In the menu, choose one of 'User', 'Roles', or 'Groups'. These parameters return information about the user who is currently accessing the query; respectively, the user name, the array of roles to which the user belongs, and the array of groups to which the user belongs.
11. Press 'Finish' to exit the Wizard.

12. Click the 'Save' button in the Style Studio toolbar to save the query.
Figure 5. Text Query Output

See Also
Text Data Source, for information on how to configure a Text data source.
| << Condition Walkthrough | © 1996-2013 InetSoft Technology Corporation (v11.4) | 6.6.3 Querying a Java Object Data Source >> |