Result.getText(options)

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.

Note:

This method is overloaded. You can also use Result.getText(column) to get a column value. This method takes in a single search.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
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.name

string

Required

The name of the search column.

options.join

string

Optional

The join internal ID for the search column.

options.summary

string

Optional

The summary type used for the search column. See search.Summary.

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 searchResults = mySearch.run().getRange({
    start: 0,
    end: 100
});
for (var i = 0; i < searchResults.length; i++) {
  var amount = searchResults[i].getText({
    name: 'amount'
  });
  var entity = searchResults[i].getText({
    name: 'name',
    join: 'location'
  });
...
//Add additional code 

        

Related Topics

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

General Notices