3.1 Using Queries

Queries let you quickly find handheld devices that match criteria specified in the query.

Using queries, administrators can save time by automatically creating handheld groups populated with handheld devices that have the same attributes.

For example, you can create a group from a query that contains all devices that have:

You can define separate queries for BlackBerry, Palm OS, and Windows CE devices, but you cannot create a single query that returns all types of devices.

The following sections contain additional information about creating queries:

3.1.1 Creating a Query

You create queries in the ZENworks Handheld Management Inventory Viewer.

  1. In Novell ConsoleOne®, right-click a handheld device object, click Actions, then click Inventory.

  2. Click Queries, then click Add Query to display the Add Query window.

    Add Query dialog box
  3. Type a name for the query.

  4. Click Palm OS Handhelds in the Query Type drop-down list to create a query for Palm OS devices.

    or

    Click Windows CE Devices in the Query Type drop-down list to create a query for Windows CE devices.

    or

    Click BlackBerry Devices in the Query Type drop-down list to create a query for BlackBerry devices.

  5. Click the Add Item button pi .

    The following dialog box appears if you are querying on Windows CE devices.

    Select Query Object dialog box
  6. Select the first object you want to make part of the query, then click OK.

    Select Query Object dialog box

    The first column lists the attributes you can make part of the query. Click the second column to display a down-arrow, click the down-arrow, then select the operator that you want to use. When you click the third column, a browse button displays. Click the browse button, then select a value for the query.

  7. Select the attributes, operator, and values of the object that you want ZENworks Handheld Management to query on, then click OK.

    Edit Query dialog box

    If you want to the query to contain multiple objects, click the Add Item button again to add a new object.

    NOTE:Select the statements and click the parenthesis button pi if you want to group statements using parentheses.

    When you select multiple attributes to query on, be aware that they are filtered by the first object you pick.

    For example, if the first attribute you select is OS Version = 3.5 and the second object you select is Free RAM, when you choose a specific value for Free RAM, the only values in the list are handheld devices running OS version 3.5.

    If you want to review the results of the query that you have defined, click Test. The result is displayed in the Test Query dialog box.

    Test Query dialog box
  8. Click OK to save the query.

3.1.2 Using Logical Operators

Logical operators in a query allow you to refine or expand the scope of the query. ZENworks Handheld Management provides the following logical operators:

Table 3-1 Logical Operators provided by ZENworks Handheld Management

Operator

Description

Example

AND

Find devices that match the object criteria joined by the AND.

All Pocket PC devices AND less than 10 MB of free RAM.

OR

Find devices that match at least one of the criteria joined by the OR.

All Pocket PC devices OR all devices with more than 8 MB of RAM.

NOT

Find devices that match one criteria but not another.

All Palm OS devices and NOT with the application FileZ installed.

If you insert multiple objects for querying, ZENworks Handheld Management automatically adds an AND operator between the two object statements.

Understanding the Order of Operations

When evaluating a query, the following order of operations is used:

  1. Expressions in parentheses

  2. Expressions negated by NOT

  3. Expressions joined by AND

  4. Expressions joined by OR