Please enable JavaScript to view this site.

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

searchStarted

Scroll Prev Next More

 

Checks if search was initiated by the user. This code should go to AfterTableInit event of the table in question.

Syntax

searchStarted()

Arguments

no arguments

Return value

true - if search was initiated

 

false - if search was not initiated

Examples

If search is not started apply the initial search conditions and only show products that belong to Beverages category.

 

dynamic srchObj = SearchClause.getSearchObject("Products");
if( !srchObj.searchStarted() ) {
  srchObj.setFieldValue("CategoryName", "Beverages" );
}

See also:

About Search API

setFieldValue