Skip to main content
Version: 2025.1

FilterCondition

A builder that can define a filter condition.

Methods​

contentType​

contentType(pContentType): FilterCondition

Sets the content type that specifies the type of the content of an entity field. The following ContentTypes are available:

  • CONTENT_TYPE_LONG_TEXT

  • CONTENT_TYPE_TEXT

  • CONTENT_TYPE_HTML

  • CONTENT_TYPE_NUMBER

  • CONTENT_TYPE_TELEPHONE

  • CONTENT_TYPE_EMAIL

  • CONTENT_TYPE_LINK

  • CONTENT_TYPE_PASSWORD

  • CONTENT_TYPE_DATE

  • CONTENT_TYPE_BOOLEAN

Parameters​

pContentType
string | number | boolean

Returns​

FilterCondition

Example​

var filterConfig = neonFilter.createFilterCondition();
filterGroupConfig.contentType(neonFilter.CONTENT_TYPE_TEXT);

field​

field(pFieldName): FilterCondition

Sets the entityfield name.

Parameters​

pFieldName
string | number | boolean

entityfield name

Returns​

FilterCondition

FilterCondition


getContentType​

getContentType(): string

Returns the content type that specifies the type of the content of an entity field. Uses the constants that start with CONTENT_TYPE_ of the package neonFilter.

Returns​

string

the content type


getField​

getField(): string

Returns the entityfield name.

Returns​

string

the entityfield name


getKey​

getKey(): string

Returns the key of the filter condition.

Returns​

string

the key


getSearchOperator​

getSearchOperator(): string

Returns the search operator that specifies how to apply the filter properties to the field. Uses the constants that start with SEARCH_OPERATOR_ of the package neonFilter.

Returns​

string

the search operator


getValue​

getValue(): string

Returns the value of the filter condition.

Returns​

string

the value


isUseMultiString​

isUseMultiString(): boolean

Indicates if a search for a MultiString is to be performed.

Returns​

boolean

true if MultiString is used


key​

key(pKey): FilterCondition

Sets the key of the filter condition.

Parameters​

pKey
string | number | boolean

key

Returns​

FilterCondition

FilterCondition


searchOperator​

searchOperator(pSearchOperator): FilterCondition

Sets the search operator that specifies how to apply the filter properties to the field. The available search operators depend on the content type of the field.

CONTENT_TYPE_DATE: {SEARCH_OPERATOR_TIMEFRAME_EQUAL, SEARCH_OPERATOR_TIMEFRAME_PAST, SEARCH_OPERATOR_TIMEFRAME_COMING, SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_LESS, SEARCH_OPERATOR_LESS_OR_EQUAL, SEARCH_OPERATOR_GREATER, SEARCH_OPERATOR_GREATER_OR_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}

CONTENT_TYPE_NUMBER and aggregate field: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_LESS, SEARCH_OPERATOR_LESS_OR_EQUAL, SEARCH_OPERATOR_GREATER, SEARCH_OPERATOR_GREATER_OR_EQUAL}

CONTENT_TYPE_NUMBER and no aggregate field: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_LESS, SEARCH_OPERATOR_LESS_OR_EQUAL, SEARCH_OPERATOR_GREATER, SEARCH_OPERATOR_GREATER_OR_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}

CONTENT_TYPE_BOOLEAN: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}

If the selection mode defined as multi: {SEARCH_OPERATOR_CONTAINS, SEARCH_OPERATOR_CONTAINSNOT, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}

All content types where the input of text is possible: {SEARCH_OPERATOR_CONTAINS, SEARCH_OPERATOR_CONTAINSNOT, SEARCH_OPERATOR_STARTSWITH, SEARCH_OPERATOR_ENDSWITH, SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}

Rest of the content types: {SEARCH_OPERATOR_EQUAL, SEARCH_OPERATOR_NOT_EQUAL, SEARCH_OPERATOR_ISNULL, SEARCH_OPERATOR_ISNOTNULL}

Parameters​

pSearchOperator
string | number | boolean

Returns​

FilterCondition

Example​

var filterConfig = neonFilter.createFilterCondition();
filterGroupConfig.searchOperator(neonFilter.SEARCH_OPERATOR_EQUAL);

toJson​

toJson(): string

Converts the filter in a json format.

Returns​

string

the filter as json


useMultiString​

useMultiString(pUseMultiString): FilterCondition

Specifies to search for a MultiString.

Parameters​

pUseMultiString
boolean

useMultiString

Returns​

FilterCondition

FilterCondition


value​

value(pValue): FilterCondition

Sets the value of the filter condition.

Parameters​

pValue
string | number | boolean

value

Returns​

FilterCondition

FilterCondition