Enhanced Search Field
Learn about Enhanced Search Field attribute.
Use this attribute in Search controls to define a custom search field that searches the contents of several fields of an info area (e.g. the three email fields or the four telephone fields in KP). The search criteria can be combined by logical AND or OR. Additional search criteria added by the user (fields and filters under Add more ...) are AND-combined with the enhanced search field.
You can define any field of the current info area as an enhanced search field. (You may want to specify a Label indicating the fields functionality.) The field itself is not used in the search: You need to specify all search fields in the attribute.
Syntax
{searchFields: [comma-separated list of fields], type: ["multi" (default)|"combined"]}
You can specify either unique field IDs or XML names.
You can search numeric fields, text fields and variable catalog fields.
Depending on the value of type
, the search criteria are combined by logical AND or OR:
{searchFields:["FreeC1","FreeC2","FreeC3"], type:
"multi"
}
When entering the search term "Test" the resulting filter is F74='Test' OR F75='Test' OR F76='Test'
.
{searchFields:["FirstName","LastName"], type:
"combined"
}
- search term "John Doe":
(F3='John' AND F2='Doe') OR (F2='John' AND F3='Doe')
- search term "John,Doe":
(F3='John' AND F2='Doe')
- search term "John":
F3='John' OR F2='John
Superfluous whitespace is trimmed, i.e. searching for "John , Doe" gets the same result as searching for "John,Doe".
Example
To search for tickets by No., Subject and Problem Group, in the KM
Search control define the following for the No. field:
- Check
Auto-Wildcard Search
. - Check Enhanced Search Field and enter
{searchFields:["No","Title","ProblemGroup"], type:"multi"}
- Change the field's Label to "Ticket".