3.4 Working with Queries

The Queries node allows you to define commonly used LDAP searches that you can execute from a request or approval form by using the DNQuery control or by calling the globalQuery() method. To define the query, you specify the directory abstraction layer entity, the search root, the number of rows to retrieve, and the conditions for retrieving the source entity. You can hard-code the conditions (for example, Where LastName contains s) or specify one or more parameters that are supplied by the user on the request or approval form.

To create a query:

  1. Launch the New Query Wizard in any of these ways:

    From Designer’s menus:

    • Select File > New > Provisioning. Choose Directory Abstraction Layer Query, then click Next.

    • Select DAL > New > Query.

    From the Provisioning view:

    • Right-click Query, then select Add.

    From the directory abstraction layer editor:

    • Click the Add Query button.

    • Right-click Query, then select Add Query.

    The New Query dialog box displays.

    NOTE:When launched from the File menu, the dialog box contains fields not displayed when launched in other ways.

  2. Fill in the fields as follows:

    Field

    What to do

    Identity Manager Project and Provisioning Application

    Select the correct Identity Manager project and Provisioning Application.

    NOTE:This field displays when you create queries from the File menu.

    Query Key

    Type a unique value for the query key. This value is used in the Expression Builder to identify the query.

    Display Label

    Type a string to display in the directory abstraction layer editor and Provisioning view. This value is not visible in the Expression Builder.

  3. Click Finish.

    The editor creates the query and opens the property page for editing.

  4. Select a Query Entity. If the entity you want to use is not displayed, make sure it is defined in the Entities node.

  5. In the Parameters section, define one or more parameters for the query. To add parameters:

    1. Click Add Row.

    2. Specify a unique key and a display label for the parameter. You pass this key when calling the globalQuery() method on a form. For more information on globalQuery(), see globalQuery(fieldname, key, param).

    3. Add additional parameters by repeating these steps.

  6. To further refine the query, add Query Conditions.

    1. Click Add Condition Grouping (a Query Entity must be selected to enable Add Condition Grouping).

    2. Use the drop-down list on the left to select an attribute. The attributes in this drop-down are the attributes on the selected Query Entity.

    3. Use the drop-down in the middle to select a comparison operation to perform against your chosen attribute.

    4. Use the entry on the right to specify a value to compare against your chosen attribute. You can select a variable name by clicking Predefined Parameters to launch the Predefined Parameters dialog box.

      If the query needs to filter on more than one attribute or condition and you want to control the order in which the conditions are evaluated, you can define multiple conditions or condition groups. Within a condition grouping, you specify each criterion that you want and connect them by using the logical operations: and, or.

  7. To specify multiple condition groupings, click Add Condition Groupings and make your selections from the drop-down list boxes.

  8. Define the query’s LDAP Search properties if you want to narrow the search further than already defined for the selected entity. The query’s search root, unlike the entity search root, does not support the use of predefined parameters. For more information, see Section 3.7.3, Queries Properties.

  9. Click Save.

  10. the query to make it available to the User Application.