Siebel Developer's Reference > Operators, Expressions, and Conditions > Search Syntax >

Search Specification


Assigning a search expression to an object definition's Search Specification property is similar to the predefined query's expression; however, identifying the business component and specifying the reserved word "Search" are not required.

NOTE:  The Search Specification expression must be all on one line. If more than one line is used, an "Invalid search specification..." error message appears when you access the involved view.

The following examples show search syntax used in the Search Specification property:

  • "[Close Date] > ""04/15/95"""
  • "[Opportunity] LIKE ""C*"""
  • "[Revenue] > 500000 AND [State] = ""CA"""
  • "[Revenue] > 500000 OR [Revenue] < 10000"
  • "([Revenue] > 500000 AND [State] = ""CA"") OR ([Revenue] > 200000 AND [State] = ""FL"")"
  • "NOT ([State] = ""CA"")"

In the preceding examples, the fields declared must exist within the designated object definition (like business component or Report) and must adhere to the object type's declaration standards.

When drilling down on a record, if the search specification of the target applet is different from the originating applet, the first record of the destination view is displayed rather than the drilled-down record.

NOTE:  A search done through a Search Specification property is always case-sensitive. You can use the ~ modifier, however, to make the search case-insensitive. For example, you might use [Last Name] ~LIKE 'g*' or [Last Name] ~= 'GRANER'

About Searching and Sorting on Division ID and Division Name

The two functions DivisionId() and DivisionName() are available for search and sort specifications and calculated values.

For example, you can add the predefined variable DivisionId() to the search specification property of an applet to limit the visibility of the applet to employees from the same division as the person logged in:

"DivisionId() = [Division Id]"

However, these functions are not available for the scripting languages. To return the Division Id or Division Name in a script, you must use the GetFieldValue business component method, as shown in the following example.

To return the Division Id using Siebel eScript

  • Use the following code:

    var oEmpl = TheApplication().GetBusObject("Employee");

    var bcEmp = oEmpl.GetBusComp("Employee");

    bcEmp.ActivateField("Division Id");

    bcEmp.ActivateField("Login Id");

    bcEmp.SetSearchSpec("Login Id", TheApplication().LoginId());

    bcEmp.ExecuteQuery(ForwardOnly);

    bcEmp.FirstRecord;

    var divId = bcEmp.GetFieldValue("Division Id");

Siebel Developer's Reference Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.