Result.getText(column)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Used on select, image, and document fields. Returns the text value of a specified search result column. For convenience, this method takes a single search.Column Object.

Note:

This method is overloaded. You can also use Result.getText(options) to get column text value based on the name, join and summary values for a column.

Returns

string

Supported Script Types

Client and server scripts

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

Governance

None

Module

N/search Module

Since

2015.2

Parameters

Parameter

Type

Required / Optional

Description

column

search.Column

Required

Name of the search result column.

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 mySearch = search.load({
    id: 'customsearch_my_so_search'
});

var resultSet = mySearch.run();
var firstResult = resultSet.getRange({
    start: 0, 
    end: 1
})[0];

// get the text value of the second column (zero-based index)
var value = firstResult.getText(resultSet.columns[1]);
  
log.debug({
    title: 'Value: ',
    details: value
});
...
//Add additional code 

        

Related Topics

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

General Notices