Siebel Applications Administration Guide > Ongoing Application Administration Tasks >

Setting Up Predefined Queries


To set up predefined queries, review the following topics:

About Setting Up Predefined Queries

Predefined queries (PDQ) automate queries that a user can perform online. Rather than creating a query, entering criteria, and running the query, the user selects a PDQ from the Queries drop-down list.

Predefined queries can be private (available only to the person who created them) or they can be public (available to all the users of the Siebel application).

Set up predefined queries in the following ways:

  • Create and execute a query in the usual way, and then save the query.
  • Create or modify a predefined query in the Predefined Query screen.

Guidelines for Setting Up Queries

When setting up queries, remember:

  • The Administrator can define a PDQ using both displayed and nondisplayed fields.
  • You can reference only fields from the current applet's business component in your query.
  • On occasion, using the asterisk (*) wildcard character to find all entries in a field can cause a performance problem. If you encounter a performance problem, then use IS NOT NULL instead. For more information about query operators, see Siebel Fundamentals.

    Predefined queries are defined on a business object. All screens that are based on the same business object display all the predefined queries created for that business object.

  • Querying on fields of data type DTYPE_NOTE is not supported on some databases.

Creating Predefined Queries

The following procedure describes how to create a predefined query by saving a query.

To create a predefined query by saving a query

  1. Navigate to the screen where you want to run the query.
  2. Create and execute a query.
  3. From the application-level menu, select Query, then Save Query As.
  4. In the Save Query As dialog box, enter a name for the query.

    The query is added to your list of predefined queries. This query is private, and only you can view it.

  5. If you want to make the query public, then perform the following steps:
    1. Navigate to the Administration - Application screen, then the Predefined Queries view.
    2. In the Predefined Queries list, deselect the Private field in the record for the query you just created.

Setting Up Queries in the Predefined Query View

The following procedure describes how to set up a query in the Predefined Query view.

To set up a predefined query in the Predefined Query view

  1. Navigate to the Administration - Application screen, then the Predefined Queries view.
  2. In the Predefined Queries list, create a new record, and complete the necessary fields.

    Some fields are described in the following table.

    Field
    Comments

    Object

    Select the object on which the query is performed.

    Name

    Type the name that appears in the predefined query drop-down list.

    Private

    Select the check box to indicate the query is available only to the person who created it.

    When you clear the check box y to make a query public, the other users must first exit the Siebel application and reenter before they can see the newly public query.

    Query

    Type the SQL code for the query.

    When you create a query for a field that is a multi-value group, you can use the EXISTS operator to query nonprimary child records. For more information about the syntax, see information about operators, expressions, and conditions in Siebel Developer's Reference.

    NOTE:  You cannot use SQL functions in the query for a predefined query.

    Cache Result

    Select the check box to indicate the query returns all rows up to the value of the DSMaxFetchArraySize parameter set for the data source. For information about setting DSMaxFetchArraySize, see information about modifying Named Subsystems in Siebel System Administration Guide.

    NOTE:  Setting DSMaxFetchArraySize to -1 and Cache Result to Y can cause memory problems for queries returning many rows.

Siebel Applications Administration Guide Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.