Column.function
|
Property Description |
Special function applied to values in a search column. See Supported Functions. |
|
Type |
string |
|
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 |
|---|---|---|
|
|
A search.Column contains an invalid function: {1}. |
Unknown function is set. |
Syntax
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