Configuring Siebel Business Applications > About Applets, Controls and List Columns > Options to Create an Applet >

Options to Filter Data Displayed in an Applet


A search specification is an expression you can define in the Search Specification property that filters the set of CRM data that Siebel CRM displays in an applet. Although this topic describes a search specification for an applet, in general this information also applies to the search specification for a business component, link, or list.

For more information, see the following topics:

The search specification contains the names of one or more fields in the business component and various operators. These items constitute a logical condition that determines which Siebel CRM records Siebel CRM displays in the applet:

  • If the result of the search specification is TRUE for a Siebel CRM record, then Siebel CRM displays the record in the applet.
  • If the result of the search specification is FALSE for a Siebel CRM record, then Siebel CRM does not display the record in the applet.

The following search specification illustrates how you can filter CRM data so that Siebel CRM only displays records that contain a revenue that is greater than 5000:

[Revenue] > 5000

The following search specifications provide more examples of how you can filter CRM data:

[Type]= "COST LIST"

[Competitor] IS NOT NULL and [Competitor] <> "N"

[Type] = LookupValue ("TODO_TYPE", "In Store Visit")

Major Elements of a Search Specification

Table 19 describes the major elements of a search specification.

Table 19. Major Elements of a Search Specification
Element
Description

Comparison Operator

Compares the value in a field to a constant, or the value in one field to the value in another field. Siebel CRM allows the following operators:

  • = (equal to)
  • <> (not equal to)
  • > (greater than)
  • < (less than)
  • >= (greater than or equal to)
  • <= (less than or equal to)

The following is an example search specification that uses the greater than comparison operator:

[Revenue] > 5000

String Constant

The string constant is enclosed in double quotation marks. Because a string value is case sensitive, uppercase and lowercase letters in a string constant must match exactly the string in the CRM record. The following is an example search specification that uses the COST LIST string:

[Type] <> "COST LIST"

Logical Operator

The logical operators AND, OR, and NOT negate or combine elements in a search specification. Case is ignored in these operators. For example, and performs the same operation as AND. The following is an example search specification that uses the AND logical operator:

[Competitor] IS NOT NULL and [Competitor] <> "N"

Field Name

A field name in a search specification is enclosed in square brackets. The following is an example search specification that references the Conflict Id field:

[Conflict Id] = 0

LIKE Operator

The LIKE operator creates a text string search specification in which the specification compares the value of a field to a constant, or compares the value of a field to the value of another field. A match on only the first several characters in the string is required. The LIKE operator uses the following wildcard characters:

  • * (asterisk). Indicates any number of characters.
  • ? (question mark). Indicates a single character.

The following is an example search specification that uses the LIKE operator:

[Last Name] LIKE "Sm*"

In this example, the Last Name values of Smith, Smythe, Smallman, and so forth causes the search specification to evaluate to TRUE.

Length

The search specification must not exceed 255 characters.

How Siebel CRM Handles a Hierarchy of Search Specifications

Because you can define a separate search specification on an applet, business component, link, or list, Siebel CRM uses specific logic to handle a situation where a hierarchy of search specifications exists. For example, if a search specification is defined on the applet and on the business component, then Siebel CRM does the following:

  1. Appends the search specification on the applet to the search specification on the business component. Siebel CRM does not override the search specification on the business component. You cannot use a search specification on an applet to override a search specification that is defined on the underlying business component.
  2. In the Siebel client, Siebel CRM converts the search specification on the applet to a WHERE clause.
How Siebel CRM Executes a Search Specification That Is Defined on a Child Applet

If a search specification is defined on a child applet, then Siebel CRM does the following:

  • If a child applet references the same business component as the parent applet, then Siebel CRM does not execute the search specification that is defined on the child applet.
  • If a child applet does not reference the same business component as the parent applet, then Siebel CRM does the following:
    • To maintain the context for the search specification with the parent applet, amends the search specification that is defined on the child applet with a WHERE clause.
    • Executes the search specification that is defined on the child applet.
How Siebel CRM Executes a Search Specification That Is Defined on a Link or List

If a search specification is defined on a link, then Siebel CRM does the following:

  • The Search Specification property of a link applies to the child business component. If a search specification also exists in the applet, then Siebel CRM uses an AND query operator to add the search specification on the applet to the search specification on the link.

    NOTE:  A sort specification on a link only applies to an association list.

If a search specification is:

  • Defined on a list, then Siebel CRM does overrides any search specification that is defined on the business component.
  • Not defined on the list, then Siebel CRM uses the search specification that is defined on the business component.

How Siebel CRM Handles a Search Specification if Multiple Applets Are Involved

If two applets reference the same business component, and if these two applets are included in the same view, then Siebel CRM generates one query against the Siebel database to update these applets. Because a database SELECT statement only supports one WHERE clause, the following conditions apply:

  • Only one of the applets can contain a search specification.
  • If multiple applets each contain a search specification, then each search specification on each applet must be identical.

For example, Siebel CRM displays the Account List Applet and the Account Entry Applet in the Account List View. In the Account Entry Applet, Siebel CRM also displays the record that is chosen in the Account List Applet. If the user chooses a different row in the list or scrolls through the list, then Siebel CRM updates the Account Entry Applet to make sure the same record is chosen in the Account List Applet. Because Siebel CRM enters data into these applets from the same query, the applets display the same record set.

Do not define the same search specification on the business component and on the applet. If you define the same search specification on the business component and on the applet, then duplicate joins might result.

If a view must include two applets that must not display master detail relationships, then make sure each applet references a different business component. If these applet reference the same business component, then Siebel CRM might automatically synchronize them in the Siebel client because of links defined in the business objects.

How the Applet Visibility Type Property Affects a Search Specification

If the Applet Visibility Type property of the view web template item includes a value that is not null, then Siebel CRM might ignore a search specification that is defined for the applets in that view. It is recommended that you use this property for applets in a view that reference a different business component. If you use this property, test it thoroughly for functionality.

Configuring Siebel Business Applications Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.