Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Search API > Methods

Search API: getSearchOption

Scroll Prev Next More

 

Returns the search option. This code should go to AfterTableInit or BeforeDisplay events of List or Print pages.

Syntax

getSearchOption(field);

Arguments

field

the name of the field.

Return value

Returns the search option, which is one of the following constants:

•Constants.CONTAINS

•Constants.EQUALS

•Constants.STARTS_WITH

•Constants.MORE_THAN

•Constants.LESS_THAN

•Constants.BETWEEN

•Constants.EMPTY_SEARCH

•Constants.NOT_CONTAINS

•Constants.NOT_EQUALS

•Constants.NOT_STARTS_WITH

•Constants.NOT_MORE_THAN

•Constants.NOT_LESS_THAN

•Constants.NOT_BETWEEN

•Constants.NOT_EMPTY

Examples

 

Print the the search option of Horsepower field on the screen.

 

 

dynamic srchObj = SearchClause.getSearchObject("Cars");
MVCFunctions.Echo(srchObj.getSearchOption("Horsepower"));

 

See also:

•Search API: setSearchOption()

•Choose fields screen: Search and Filter settings

•About Search API