Quick Search

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":"eq|like|likeic"
      "toUpperCase":"false|true"
    },
    { "name":"name of the property"
      "sequence":2
      "properties":[
       ..
       ]
    }

}

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

The properties on the resource forms a search criteria. For the array or object and reference type of 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. For details on "Property Representation" chapter of the Developer Guide.

The quick search component supports two modes 1) AND and 2) OR

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 property) is executed to ensure that 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 a Equals, Like or Like Ignore Case depending on the operator setting for string and integer type of attributes. The default setting for operator is likeic - like ignore case.

Specifying criteriaMandatory as true restricts a user from performing a blank search. When not specified 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 of the search properties the quick search input field, a placeholder text is displayed. The displayed text is a combination of boilerplate text Search on and 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 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 to first select the criterion to search on from the list. Once the criterion is selected, user gets prompted to enter value - for this a input text/number value is shown. When the value is entered, and the input value box closes and search is triggered.

User may select more than one criterion and a search request is executed with AND statements and the input value is inserted in the query with a Equals, Like or Like Ignore Case depending on the operator setting for string and integer type of attributes. The default setting for operator is likeic - like ignore case.

The search takes into account toUpperCase and operator settings. For 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 inline referenced property ( that is not not any string fields) toUpperCase and operator settings do not apply. System always uses eq in this case.

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.

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

UI Essentials

When user reaches to type in the search bar a criterion selection drop down gets 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 gets triggered when user click on search icon or anywhere outside the selection drop down. The drop down collapses when search is triggered.

If only one search criterion is configured and then the mode setting gets ignored and 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 quick search on claim code and service member last name.