Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods > SetSearchExpr MethodSetSearchExpr sets an entire search expression on the business component, rather than setting one search specification for each field. Syntax is similar to that on the Predefined Queries screen. SyntaxBusComp.SetSearchExpr searchSpec ReturnsUsageCall this method after ClearToQuery and before ExecuteQuery. It is not necessary to use ActivateField on a field that is used in SetSearchExpr. The maximum length of a predefined query is 2000 characters. The argument assigned to SetSearchExpr is the same as that used after the equal sign in a predefined query. For example, the first line following is a search specification in a predefined query; the second is the equivalent search specification used with the various interface methods. Note that Name is a field on the business component and therefore must be enclosed in brackets, [ ].
If field values have search keywords such as NOT, AND, and OR, use two pairs of double quotes around the field value. For example, if a field Sub-Status can have the string "Not an Issue" as a field value, you would use the following VB syntax to avoid an SQL error:
The following VB syntax generates an SQL error:
Use both SetSearchExpr and SetSortSpec to build a query that includes both a search specification and a sort specification. You cannot set a sort specification with SetSearchExpr by itself. Do not use SetSearchExpr and SetSearchSpec together; they are mutually exclusive. Any dates used with SetSearchExpr must use the format MM/DD/YYYY, regardless of the Regional control panel settings of the server or client computer. Used WithBrowser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script ExampleThe following example in Siebel eScript demonstrates how to log the current search specification to a file for debugging purposes: var Ob = TheApplication().ActiveBusObject(); Related TopicsClearToQuery Method |
Siebel Object Interfaces Reference | Copyright © 2008, Oracle. All rights reserved. | |