Case Search
The properties that appear in the Case Search view must be defined as described in Designing views, under Case Search. If no properties are defined, the view provides the default Case State, Case Identifier, and Date Created properties to be used in the search. The Case Search view provides the following optional capabilities:
- Preload case instances in the case list view without performing a search by enabling the Preload cases configuration option.
- Provide a custom search filter capability that enables you to modify the search payload and
manually add filters through an event. To enable this capability, select the Enable
custom search filter configuration option, and define the logic in the
On custom search filter
event. A customizable sample code is built in the event. - Provide an optional parameter to control the number of cases to fetch at a time. If you do not set this parameter, 200 cases are fetched by default.
- For a search that uses
date related
"is"
, the scope of the search result is equal to the selected locale date time for the next 24 hours.
Configuration properties
Property | Description | Data type |
---|---|---|
Target object store name |
The name of the repository to which the view needs to connect. |
String |
Solution prefix |
The prefix of the case solution. |
String |
Case identifier |
(Optional) The identifier of the case instance. This parameter is optional when used in the context of a solution layout, and required when it is used in the context of related cases. |
String |
Preload cases |
(Optional) Select this checkbox to load the case list by running a default search. |
Boolean |
Enable custom search filter |
(Optional) Enables the custom search filter. It enables you to add code for a custom search
filter to the |
Boolean |
Number of cases to fetch at a time |
(Optional) The number of cases to fetch through a search at one time. If this parameter is not set, the default number of cases is 200. |
Integer |
Control ID of a Case List view |
(Optional) The control ID of the target Case List view to which your Case Search view exclusively sends its search results for rendering. If this parameter is not set and more Case List views are available, all the Case List views receive the search results that are broadcast by the Case Search view. |
String |
Events
Set or modify the event handlers for the view in the Events properties. You can set events to be triggered programmatically or when a user interacts with the view. For information about how to define and code events, see User-defined events.
- On custom search filter: The event handler helps to modify the search
payload to add additional search filters programmatically rather than using the UI. Select the
Enable Custom Search Filter configuration option and define the search logic
in this event handler.
For example, the following code adds a new search filter by using the property
TSF_FirstName
whose value is set toTom
. TheTSF_FirstName
property is of typeString
and cardinalitysingle
, as defined infieldDetails
. The search filter is appended to any existing search filter that is already set in the UI. The event handler returns the modifiedsearchPayload
.
Note thatvar custom_searchPayload = searchPayload; custom_searchPayload.conditions.push({"field": "TSF_FirstName","value": "Tom","operator": "EQUAL"}); custom_searchPayload.fieldDetails.push({"field": "TSF_FirstName","cardinality": "single","dataType": "xs:string"}); return custom_searchPayload;
searchPayload.conditions
andsearchPayload.fieldDetails
must be defined for any custom filter to be added. The following conditions must be met:- In the
searchPayload.conditions
array, use valid operator values such as"EQUAL"
,"NOTEQUAL"
,"CONTAINS"
,"STARTSWITH"
,"LESS"
, or"GREATER"
. - In the
searchPayload.fieldDetails
array, use validdataType
values such as“xs:string”
(forString
),“xs:integer”
(forInteger
),“xs:double”
(forFloat
orDecimal
),“xs:timestamp”
(forDatetime
), and“xs:boolean”
(forBoolean
). - Field parameters in the
searchPayload.conditions
andsearchPayload.fieldDetails
arrays must contain the symbolic name of the case property that includes the solution prefix. - The cardinality parameter in
searchPayload.fieldDetails
can take the value“single”
or“multi”
. - Use the value parameter in
searchPayload.conditions
for the search, which can take a string, numeric, or datetime value.
- In the
- Additional resources
- For more information about how to create a coach or page, see Building coaches.
For more information about standard properties (General, Configuration, Positioning, Visibility, and HTML Attributes), see View properties. For other UI views, see UI toolkit.