Result.getText(options)
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 |
|
Since |
2015.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string |
required |
The name of the search column. |
|
string |
optional |
The join internal ID for the search column. |
|
string |
optional |
The summary type used for the search column. See search.Summary. |
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 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