Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Search API

About Search API

Scroll Prev Next More

 

This API allows you to control search panel, advanced search and 'All fields search' behavior.

Where to use the Search API?

The best events where you can use the Search API are AfterTableInitialized and List page: BeforeProcess events. You can read and write search conditions here. Changes are applied to SQL Query and are also shown on the search panel.

 

You can also use the Search API with the List page: BeforeDisplay event. You can also read and write search conditions here. The changes are nor applied to SQL Query but are shown on the search panel.

Functions

Function

Description

getSearchObject()

Gets the SearchClause object

getFieldValue()

Returns the search control value.

setFieldValue()

Replaces an existing value of a search field if the field is already added to the search panel.

Adds the field to the search panel if didn't exist there previously.

getSecondFieldValue()

Returns the second search control value.

setSecondFieldValue()

Sets the second search control value if the BETWEEN option is selected.

getSearchOption()

Returns the search option.

setSearchOption()

Sets the search option for the field.

setSearchSQL()

Sets an SQL expression for the search. Replaces the current search expression for this field.

getAllFieldsSearchValue()

Gets the 'All fields search' value.

setAllFieldsSearchValue()

Sets the 'All fields search' value.

searchStarted()

Checks if search was initiated by the user.

resetSearch()

Clears the search, as if the user pressed 'Show all' or 'Reset search'.

See also:

Search Master and Details tables together

JavaScript API: SearchField object

JavaScript API: SearchController object (deprecated)