Search¶
Search over the items in the list.
For Section, or ListPicker using target binding, only the property names available in the target EntitySet are valid search keys. By default, these keys are generated from the searchable parameters of items with values of Binding or TargetPath. Rules results or other complex mappings (e.g. Formatters or Default Value Binding) are not considered.
Specifically for iOS, Search
in SectionedTable
with ObjectHeader
as first section cannot be displayed even if
Search
is enabled.
Search Properties¶
Property | Type | Required | Default |
---|---|---|---|
AdditionalProperties | string[] |
No | |
BarcodeScanner | boolean |
No | |
Delay | integer |
No | |
Enabled | boolean |
No | |
MinimumCharacterThreshold | number |
No | |
Mode | enum |
No | "Expandable" |
OnScanPress | Rule | No | |
Options | SearchOptions | No | |
Placeholder | string |
No |
AdditionalProperties¶
Additional properties of the EntitySet that will be added to the search keys, in addition to the default ones. Strings
not available in the EntitySet, and the number-typed properties if NumberSearch
is not enabled, will be ignored. Not
applicable to ListPicker using fixed collection.
- type:
string[]
All items must be of the type: string
BarcodeScanner¶
Enables the use of a barcode scanner in search.
- type:
boolean
Delay¶
Delay
represents the number of milliseconds to delay. As a user is adding or deleting characters in the search text
entry field, it will be used to delay the execution of the search.
If Delay
is set to zero or not defined then no delay will be used and the search will be executed as soon as the user
enters the minimum character count.
If Delay
is greater than zero, then the delay will be reset each time the user enters or deletes a character under
the minimum character count.
- type:
integer
Enabled¶
Enables search on the Section or the ListPicker.
- type:
boolean
MinimumCharacterThreshold¶
The MinimumCharacterThreshold
is limited to a non-negative integer number and represents the minimum number of
characters required before a search is executed.
If the MinimumCharacterThreshold
is zero then every character will be searched.
If MinimumCharacterThreshold
is greater than 0, a minimum of Y characters will be accepted in the search field before
executing the search.
- type:
number
Mode¶
iOS and Android only. Determines how the search bar is going to be displayed.
- type:
enum
- default:
Expandable
The value of this property must be one of the known values listed below.
Value | Description |
---|---|
Expandable |
Expandable search bar display. In this mode, the search bar is initially hidden, user needs to press on search icon to show the search bar. |
Persistent |
Persistent search bar display. In this mode, the search bar is always shown. No search icon would be displayed. |
OnScanPress¶
This event will be triggered when the barcode scan button is pressed. It allows app to provide its own custom scanning capability via rule. When the rule is executed, the default barcode scan using on-device camera will not be triggered and the rule is expected to return a promise. If the promise is resolved with a string result, the search will be carried out using the result string. If the promise is rejected, then it will fallback to use the default barcode scan using on-device camera.
- type: Rule
Options¶
Options for generating the OData search query. Not applicable to ListPicker using fixed collection.
- type: SearchOptions
Placeholder¶
Placeholder text for the search field when the field is empty.
- type:
string
Use Cases¶
Delay = 0, MinimumCharacterThreshold = 0
Result is that a search is performed on each keystroke. This is appropriate for short lists.Delay = 500, MinimumCharacterThreshold = 0
Result is a search is performed when a gap of 500ms is detected after the previous entered character. This can be appropriate for short or large lists if paging support is also available.Delay = 0, MinimumCharacterThreshold = 3
Result is a search is performed only after 3 characters are entered and immediately for any character count greater than 3.Delay = 500, MinimumCharacterThreshold = 3
Result is a search is performed only after 3 characters when a gap of 500ms is detected after the previous entered character.
Examples¶
"Search": {
"AdditionalProperties": ["PlantSection"],
"Enabled": "true",
"BarcodeScanner": true,
"Delay": 500,
"MinimumCharacterThreshold": 3,
"Options": {
"CaseSensitive": "/MDKApp/Rules/GetCaseSensitivity.js",
"NumberSearch": {
"Enabled": true,
"ConversionMethod": "UseCast"
},
"UseSearchOverFilter": {
"Enabled": true
}
}
}