First you need to set a ID for your multiselect.
for example -
then you need to define the js like the following.
require([
'underscore',
'jquery',
'splunkjs/mvc',
'splunkjs/mvc/utils',
'splunkjs/mvc/tokenutils',
'splunkjs/mvc/simplexml/ready!'], function(_, $, mvc, utils, TokenUtils){
var tokens = mvc.Components.get('default');
var abcvalue = splunkjs.mvc.Components.getInstance("abcselect"); // default value is getting captured here
if (abcvalue != undefined) {
abcvalue.on("change", function(e){
console.log("abc changed to "+tokens.get("abc")); //on token change the value gets captured into through tokens.get("abc")
define your function here
});
}
});
Also please remember to put the JS file in $SPLUNK_APP$/appserver/static folder
... View more