Applications Administration Guide > Ongoing Application Administration Tasks >

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 application).

Both public and private predefined and user-defined queries are stored in the database table S_APP_QUERY.

There are two ways to set up predefined queries:

For more information about the syntax of Siebel queries, see Fundamentals and Siebel Tools Reference.

When setting up queries, remember:

NOTE:  In the preconfigured application, the records shown on the application home page are determined by the predefined query Default, which is performed on the object WebCallCenter Home.

To create a predefined query by saving a query

  1. Navigate to the screen where you will run the query.
  2. Click the Query button in the applet title bar or select New Query from the applet drop-down menu.
  3. In the applet that is displayed, enter the criteria for the new query.
  4. Click the Go button and then click Run Query.

    The query's results appear.

  5. From the application-level menu, choose Edit > Query > Save As.
  6. In the Save Query As dialog box, enter a name for the query, and click OK.

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

  7. If you want to make the query public:
    1. From the application-level menu, choose View > Site Map > Application Administration > Predefined Queries.
    2. In the Predefined Queries list, deselect the Private field in the record for the query you just created.

To set up a predefined query in the Predefined Query view

  1. From the application-level menu, choose View > Site Map > Application Administration > Predefined Queries.
  2. In the Predefined Queries list, add a new record and complete the necessary fields.

    Some fields are described in the following table.

    Field
    Comments
    Name
    This is the name that appears in the predefined query drop-down list.
    Object
    The object upon which the query is performed.
    Private
    Marked if the query is available only to the person who created it.
    When you unmark a query to make it public, the other users must first exit the application and reenter before they can see the newly public query.
    Query
    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.
    Cache Result
    If this is Y, the query returns all rows up to the value of the DSMaxFetchArraySize parameter set for the data source.
    For information about setting DSMaxFetchArraySize, see about modifying Named Subsystems in the Siebel Server Administration Guide.
    Note: Setting DSMaxFetchArraySize to -1 and Cache Result to Y may cause memory problems for queries returning many rows.

About Multi-Value Group Queries in Siebel Industry Applications

In Siebel Industry Applications, the default behavior of queries in Multi-Value Group (MVG) fields is set to automatically add an EXISTS statement to every MVG query. This allows detailed cross-business object queries, such as the following example from Siebel Pharma:

This MVG behavior, however, also prevents the following query in an MVG field:

EXISTS (A) AND EXISTS (B).

To disable the EXISTS statement


 Applications Administration Guide
 Published: 09 September 2004