Filter.formula

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

Formula used by the search filter. Use this property to get or set the formula used by the search filter.

For more information about the formula property, see search.createFilter(options). For more information about using formulas in searches, see Formulas in Search.

Type

string

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/search Module

Since

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/search Module Script Samples.

For more examples of search formulas, see Search Formula Examples and Tips.

          // Add additional code 
...
var result = search.create({
    type: 'employee',
    columns: ['firstname', 'lastname', 'role'],
    filters: [
      search.createFilter({
        name: 'formulanumeric',
        formula: '{today} - {hiredate}',
        operator: search.Operator.LESSTHAN,
        values: 30
      })
    ]
 
}).run().getRange({
    start: 0,
    end: 100
});
...
// Add additional code 

        

Related Topics

search.Filter
N/search Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices