Column.function

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

Special function applied to values in a search column. See Supported Functions.

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

Supported Functions

The following table lists the supported functions and their internal IDs:

Internal ID

Name

Date Function

Output

percentOfTotal

% of Total

No

percent

absoluteValue

Absolute Value

No

integer

ageInDays

Age In Days

Yes

integer

ageInHours

Age In Hours

Yes

integer

ageInMonths

Age In Months

Yes

integer

ageInWeeks

Age In Weeks

Yes

integer

ageInYears

Age In Years

Yes

integer

calendarWeek

Calendar Week

Yes

date

day

Day

Yes

date

month

Month

Yes

text

negate

Negate

No

integer

numberAsTime

Number as Time

No

text

quarter

Quarter

Yes

text

rank

Rank

No

integer

round

Round

No

float

roundToHundredths

Round to Hundredths

No

float

roundToTenths

Round to Tenths

No

float

weekOfYear

Week of Year

Yes

text

year

Year

Yes

text

Errors

Error Code

Message

Thrown If

INVALID_SRCH_FUNCTN

A search.Column contains an invalid function: {1}.

Unknown function is set.

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.

          //Add additional code 
...
var columnObj = search.createColumn({ // the age of the sales order in days
   name: 'trandate',
   function: 'ageInDays'
});
...
//Add additional code 

        

Related Topics

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

General Notices