Application Framework Reference

Splunk API

getIntentionReference()

The getIntentionReference() method gets a reference to the intention specified by the specified intentionName , as constrained by the optional secondArgKey .

Synopsis

intention = getIntentionReference( intentionName , secondArgKey )

Parameters

intentionName

String

Name of the intention to get.

secondArgKey

String

(Optional) Secondary key, which must be present as an argument of intentionName for the reference to be retrieved.

Return Value

Object

Reference to the specified intention.

Example

var context = this.getContext();var search = context.get('search');
var fieldsIntention = search.getIntentionReference('setfields');
if (fieldsIntention) {
    alert('setfields exists');
} else {
    alert('setfields does not exist');
}
 

See Also

absorbIntentions()
addIntention()
clearIntentions()
hasIntentions()
popIntention()
setIntentions()