Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > SearchField object

Javascript API: SearchField object

Scroll Prev Next More

 

The SearchField object allows managing search fields on the search panel. It is used along with SearchController object.

 

SearchField object is available in the JavaScript OnLoad event for the List/Report/Chart pages (pages with a Search panel) and an Advanced Search page.

 

Use the getSearchFields() method to get the array of search fields:

 

var srch = pageObj.getSearchController();
var fields = srch.getSearchFields();

Methods

Method

Description

addOption()

Adds the option to the list of search options.

getControl()

Returns the control object of the search field.

getName()

Returns the field name.

getOption()

Returns the option for the search field that is currently selected.

getOptions()

Returns the list of all options that are currently available in the search panel.

getSecondControl()

Returns the second control object of the search field.

remove()

Removes the field from the search panel.

removeOption()

Removes the option from the list of search options.

setOption()

Selects the option for the search field.

Search options

BETWEEN

CONTAINS

EMPTY

EQUALS

LESS_THAN

MORE_THAN

STARTS_WITH

NOT_BETWEEN

NOT_CONTAINS

NOT_EMPTY

NOT_EQUALS

NOT_LESS_THAN

NOT_MORE_THAN

NOT_STARTS_WITH

See also:

JavaScript API: SearchController object (deprecated)

About Search API

Events: JavaScript OnLoad

JavaScript API