Application Framework Reference

Module API

onBeforeJobDispatched()

The onBeforeJobDispatched() method provides a mechanism for changing job settings before the job is dispatched, typically to change result parameters. The main purpose is to set the required_field_list and status_buckets params on the POST which dispatches the job.

Note: This method is intended to be overridden.

Synopsis

onBeforeJobDispatched( search )

Parameters

search

Object

Splunk.Search object to be acted upon.

Return Value

Undefined

Example

onBeforeJobDispatched: function(search) {
    var fields = this.getNormalizedFields();  
    if (this.entityName!="results") {
        search.setMinimumStatusBuckets(1);
        if (fields.length>0) {
            search.setRequiredFields(fields);
        }  
    }  
},