search.Column
Object Description |
Encapsulates a single search column in a search.Search. Use the methods and properties available to the Column object to get or set Column properties. You create a search column object with search.createColumn(options) and add it to a search.Search object that you create with search.create(options) or load with search.load(options). You can pass a Column object as a parameter to the Result.getValue(column) or Result.getText(column) methods. In addition, search.ResultSet contains an array of Column objects returned in the results of a search. For a complete list of this object’s methods and properties, see Column Object Members. |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Since |
2015.2 |
Syntax
The following code snippet 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
...
search.create({
type: search.Type.TRANSACTION,
columns: [
'trandate',
'amount',
'entity',
'entity.firstname',
'entity.email',
search.createColumn({
name: 'formulatext',
formula: "{lastname}||', '||{firstname}"
})
],
// When the search is executed, the corresponding column in the result will then contain a value in the form: Last Name, First Name
...
//Add additional code