Result.getValue(options)
Method Description |
Used on formula and non-formula (standard) fields. Returns the value of a specified search result column. Takes in arguments for name, join, and summary.
Note:
This method is overloaded. You can also use Result.getValue(column) to get column values. This method takes in a single search.Column.
Important:
If you have multiple search return columns and you apply grouping, all columns must include a summary property. |
Returns |
The return type depends on the type of search result column that was specified:
|
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 search return column name. |
|
string |
optional |
The join id for this search return column. Join IDs are listed in the Records Browser. For more information, see Working with the SuiteScript Records Browser. |
|
string |
optional |
The summary type for this column. See search.Summary. |
|
string |
optional |
Special function for the search column. See Column.function. |
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].getValue({
name: 'amount'
});
var entity = searchResults[i].getValue({
name: 'name',
join: 'location'
});
...
//Add additional code