Application Framework Reference

Splunk API

getResultCount()

The getResultCount() method gets the number of results for the current job. If the job is preview-enabled, meaning that partial results are available before the job is done, this method returns the number of partial results.

Synopsis

count = getResultCount()

Return Value

Integer

Number of results within the current job.

Example

var context = this.getContext();
var search = context.get('search');
console.log('Result count = ' + search.job.getResultCount().toString());
 

See Also

getEventAvailableCount()
getEventCount()
getScanCount()