Quick Search

The Quick Search component allows users to perform an immediate search within the current page or tab. Also supports:

  • Search on string and integer properties, including reference-type properties and arrays.

  • For arrays, objects, or reference-type properties, specify the exact attribute (nested property) on which the search is performed.

The structure of the quick search component is as follows:

"quickSearch":{
  "criteriaMandatory":true|false,
  "mode":"AND|OR",
  "properties":[
    { "name":"name of the property"
      "sequence":1,
      "queryOperator":""bet|gte|lt|like|likeic|eq|neq"
      "mandatory: true|false,
      "toUpperCase":false|true
    },
    { "name":"name of the property"
      "sequence":2
      "properties":[
       ..
       ]
    }

}

This component supports search on string and integer (and number) type properties. With the and mode, it is also possible to search on referenced properties (using LOVs), date, datetime, enum, and amount fields. At a minimum, one valid property (when a specified property does not exist, the system ignores that property) should be specified; if no property is specified, the component is rendered disabled.

The properties of the resource form a search criterion. For arrays or object and reference-type properties, it is necessary to specify the exact attribute (nested property) on which the search should be performed. More than one nested property can be specified. In this case, each nested property forms a separate search criterion. See Property Representation (GET) and Property Representation and Handling (PUT, POST, PATCH) for more details.

The quick search component supports the following two modes:

OR Mode

To use the quick search, a user only needs to enter characters in the input field, after which results are automatically fetched; clicking the search button is optional. An automatic search is performed when the field is in focus. For every character entered, a new search query is performed. Wait time (configurable via a property) is executed to ensure that the user has stopped typing before the search is executed. In case no input characters are entered, all results are obtained either by clicking the search button or by clicking enter when the focus is in the input field.

The search takes into account toUpperCase and operator settings. When the attribute toUpperCase is set to true, the system converts the entered character value to uppercase. The default setting is false.

A search request is executed with OR statements, and the input value is inserted in the query with an Equals, Like or Like Ignore Case, depending on the operator setting for string and integer type of attributes. The default setting for the operator is likeic — like ignore case.

Specifying criteriaMandatory as true restricts a user from performing a blank search. When not specified, the system considers it to be false.

UI Essentials

The quick search queries all properties specified in the component. These properties are defined within the element quickSearch. For each search property, the quick search input field displays a placeholder. The displayed text is a combination of boilerplate text, the Search on label, and the labels of the properties used in the quick search. Labels are separated with a comma followed by a space. For example, when the quick search is using the properties code and message, the placeholder text in the input field displays:

  • Search on code, message

quick search

AND Mode

To use the quick search, a user needs first to select the criterion to search on from the list.

Once the criterion is selected, the user is prompted to enter a value; for this, an input field for a text/number value is shown. When the value is entered, the input value box closes, and the search is triggered.

The user may select more than one criterion, and a search request is executed with AND statements. The input value is used into the query depending on the operator setting.

The following operators are suppored

  • String - likeic,eq,like

  • Datetime - bet,eq,gte,lte

  • Date - bet,eq,gte,lte

  • Money - bet,eq,gte,lte

  • Number - bet,eq,gte,lte,neq,like,likeic

  • Enum - eq

  • Referenced properties(LOV) - eq

When query operator is not specified the following defaults are used:

  • String - likeic

  • Datetime - eq

  • Date - eq

  • Money - eq

  • Number - eq

  • Enum - eq

  • Referenced property - eq

The search takes into account toUpperCase and operator settings. When the attribute toUpperCase is set to true, the system converts the entered character value to uppercase. The default setting is false.

For LOVs based on an inline-referenced property (that is not any string field) toUpperCase, operator settings do not apply. The system always uses eq in this case.

If no input characters are entered, all results are obtained either by clicking the search button or by clicking enter when the focus is in the input field.

Specifying criteriaMandatory as true restricts a user from performing a blank search. When not specified, the system considers it to be false. Individual criteria can be marked as mandatory by setting the mandatory property to true at the property level.

UI Essentials

When the user starts typing in the search bar, a drop-down for criterion selection is displayed. Once a user enters the criterion and tabs to the next one, the criterion is added to the search bar.

quick search and mode

Search is triggered when the user clicks the search icon or anywhere outside the selection drop-down. The drop-down collapses when the search is triggered.

If only one search criterion is configured, then the mode setting is ignored and the system defaults to OR mode.

Example: Quick Search on Object Claims

"quickSearch":{
  "properties":[
    { "name":"code",
      "sequence":1
    },
    { "name":"serviceMember",
// referenced property on claims resourced is specified upto single value property name
      "sequence":2,
      "properties":[
       {"name":"name",
        "sequence":1
       }]
    }
  ]
}

This enables a quick search by claim code and service member’s last name.