Application Framework Reference

Splunk API

areResultsTransformed()

The areResultsTransformed() method indicates whether or not search results are transformed. Results are transformed when search commands, such as timechart and stats, have populated the results set with different data than the events set. Use this method to determine whether to retrieve data from the job events set or results set.

Synopsis

results = areResultsTransformed()

Return Value

Boolean

Results endpoint returns transformed results indication:

true = Search results are transformed.

false = Search results are not transformed.

Example

var context = this.getContext();
var search = context.get('search');
var entityName;

if (search.job.areResultsTransformed()) {
   entityName = 'results';
} else {
   entityName = 'events';
}

console.log(entityName);
 

See Also

getStatusBuckets()
Splunk.Context
Splunk.Search