Modules

filter

 

Objects/Functions

module (N/query)

SuiteScript 2.0

query.Operator

{query}.Operator{AFTER: {AFTER},AFTER_NOT: {AFTER_NOT},ANY_OF: {ANY_OF},ANY_OF_NOT: {ANY_OF_NOT},BEFORE: {BEFORE},BEFORE_NOT: ${7:BEFORE_NOT},BETWEEN: ${8:BETWEEN},BETWEEN_NOT: ${9:BETWEEN_NOT},CONTAIN: {0:CONTAIN},CONTAIN_NOT: {1:CONTAIN_NOT},EMPTY: {2:EMPTY},EMPTY_NOT: {3:EMPTY_NOT},ENDWITH: {4:ENDWITH},ENDWITH_NOT: {5:ENDWITH_NOT},EQUAL: {6:EQUAL},EQUAL_NOT: {7:EQUAL_NOT},EXCLUDE_ALL: {8:MN_EXCLUDE},EXCLUDE_ANY: {9:MN_EXCLUDE_ALL},EXCLUDE_EXACTLY: {0:MN_EXCLUDE_EXACTLY},GREATER: {1:GREATER},GREATER_NOT: {2:GREATER_NOT},GREATER_OR_EQUAL: {3:GREATER_OR_EQUAL},GREATER_OR_EQUAL_NOT: {4:GREATER_OR_EQUAL_NOT},INCLUDE_ALL: {5:MN_INCLUDE_ALL},INCLUDE_ANY: {6:MN_INCLUDE},INCLUDE_EXACTLY: {7:MN_INCLUDE_EXACTLY},IS: {8:IS},IS_NOT: {9:IS_NOT},LESS: {0:LESS},LESS_NOT: {1:LESS_NOT},LESS_OR_EQUAL: {2:LESS_OR_EQUAL},LESS_OR_EQUAL_NOT: {3:LESS_OR_EQUAL_NOT},ON: {4:ON},ON_NOT: {5:ON_NOT},ON_OR_AFTER: {6:ON_OR_AFTER},ON_OR_AFTER_NOT: {7:ON_OR_AFTER_NOT},ON_OR_BEFORE: {8:ON_OR_BEFORE},ON_OR_BEFORE_NOT: {9:ON_OR_BEFORE_NOT},START_WITH: {0:START_WITH},START_WITH_NOT: {1:START_WITH_NOT},WITHIN: {2:WITHIN},WITHIN_NOT: {3:WITHIN_NOT}})

N/query Module
query.Operator
Enum Description: Holds the string values for operators supported in SuiteScript Analytic APIs. SuiteScript Analytic APIs help you work with analytical data in NetSuite using SuiteScript. For more information, see SuiteScript Analytic APIs. This enum is used to specify the operator argument to Query.createCondition(options) and Component.createCondition(options). This enum is also used to specify the operator argument to methods in the N/dataset and N/workbook modules, such as dataset.createCondition(options) and workbook.createTableFilter(options). For more information, see Workbook API (Beta). Values for this enum are listed in the Values section. The following columns provide information about each operator: Value — Use these values to specify operators in most queries (for example, query.Operator.BEFORE). To use these values, you must include the N/query module in your script. Mapped String Value — Use these values as strings that represent the corresponding operators (for example, 'BEFORE'). To use these values, you do not need to include the N/query module in your script. Use For — Use this column to determine the value types that each operator supports. For example, the query.Operator.AFTER operator is designed to be used with date/time values, and you cannot use this operator with string or boolean values. Some operators are similar but are designed to be used with different value types (such as query.Operator.IS for boolean values and query.Operator.EQUAL for numeric values). For multi-select fields, you can use the query.Operator.INCLUDE_* and query.Operator.EXCLUDE_* values to specify a set of exact field values. For example, to obtain script deployment records that apply to all execution contexts except the WEBAPP and WEBSTORE contexts, you can use the query.Operator.EXCLUDE_ALL operator. You cannot use the query.Operator.ANY_OF_NOT operator to obtain these records, because this operator uses an implicit OR operator between all specified values. The query.Operator.EXCLUDE_ALL operator uses an implicit AND operator between all specified values, which lets you create more complex conditions. JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.
Module: N/query Module
Sibling Module Members: N/query Module Members
Since: 2018.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=query.Operator

Example:

// Code Example 1
// Add additional code
//...
var myCustomerQuery = query.create({
type: query.Type.CUSTOMER
});

var mySalesRepJoin = myCustomerQuery.autoJoin({
fieldId: 'salesrep'
});

var firstCondition = myCustomerQuery.createCondition({
fieldId: 'id',
operator: query.Operator.EQUAL,
values: 107
});
var secondCondition = myCustomerQuery.createCondition({
fieldId: 'id',
operator: query.Operator.EQUAL,
values: 2647
});
var thirdCondition = mySalesRepJoin.createCondition({
fieldId: 'email',
operator: query.Operator.START_WITH_NOT,
values: 'foo'
});

myCustomerQuery.condition = myCustomerQuery.and(
thirdCondition, myCustomerQuery.not(
myCustomerQuery.or(firstCondition, secondCondition)
)
);

var resultSet = myCustomerQuery.run();
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1510275752.html