Specifying Query Using Standard View

The Standard View tab provides a convenient user interface for defining simple queries.

To define a query using the Standard View, follow the steps below:

  1. Specify the name of the business object or business object group that the query will be looking for in the “Business object or group” drop down of the editor. If you want the query to perform a search using business object form click on the “Use form” property in the Element Properties window and select the form of the business object – see Searching for Data Using Forms.
  2. If the query looks for all instances of the business object or business object group or if you have specified that the query would perform a search using forms, you can skip this step. Otherwise you must provide the conditions that the instances of the business object or group must match for the query to find them. To specify the query conditions do the following:
    1. Click on the “Attribute/Expression” cell in the first row of the “Matching Criteria” table. In the combo box that appears select an attribute of the business object or an attribute of the referred object.
    2. Click on the “Criterion” cell in the table. In the combo box that appears select the criterion you want.
    3. Click on the “Value/Expression” cell in the table and type in the value that the selected attribute will be compared with using the selected criterion. For example, if you selected Account.Balance in the “Attribute/Expression” cell, “>” in the “Criterion” cell and entered 1000 in the “Value/Epression” cell the query will look for all instances of the Account object with account balances greater than 1000.
    4. If the query uses more than one condition specify other conditions in other rows of the table. By default the conditions will be linked with the AND keyword. If you want to link the conditions with the OR keyword click on the “Link” cell and select OR from the combo box displayed
    5. If the query uses more conditions than the number of rows available in the table click on the icon at the top of the table. If you want to delete a condition select the condition by clicking on any cell in the condition’s row and click on the icon.
  3. You can optionally sort instances found by the query. You can sort by the value of the attribute(s) of the business object that the query is looking for. If you specify several attributes then the instances will be sorted by the value of the first attribute. If there are equal entries they will be sorted by the value of the second attribute and so on. You can also specify whether sorting will be performed in the ascending or descending order.
    1. To specify the attribute to sort by tick the checkbox next to the attribute name in the “Sorting of Results” table.
    2. To specify the order of sorting click on the Order cell in the table and choose “Ascending” or “Descending”.
    3. To change the order of entries select the entry and press the Up or Down buttons at the top of the editor.
  4. You can also specify that the query should return only a certain number of instances (the first ones). This option is usually used in conjunction with sorting – you can sort the instances found by the query and then return the first “n” instances. To specify the number of instances to return select the “Return first” radio button in the “Return Results” section and specify the number in the text box next to the radio button.

note

You can use the ID attribute in the query conditions and sorting.

note

One of the expressions that you can select when defining query conditions is “Ask at run time”. This expression indicates that the value of the attribute should be entered by the user when the query is run (see Queries that Require User’s Input). Note that if you look at such a query in the Rule Form, the corresponding condition will be shown with the question mark, for example:
FIND Forum WHERE Forum.Title=?Title 

When a user runs this query Aware IM will prompt the user to enter the value of the Forum Title and then display the result. The string after the question mark indicates the text that will be displayed when Aware IM prompts for the value of the attribute. By default this text is equal to the name of the attribute, but you can change it to anything you like on the Textual View tab (if a text has spaces enclose the text in apostrophe).

  • Last modified: 2022/09/13 18:15