i want to set token value ="*" on button click/link click on the dashboard.
is it possible to achieve without JS?
@kamlesh_vaghela any inputs pls?
Hello @DataOrg ,
If the button is from Simple XML then you can set token in xml only but in case of HTML button or any element you have to go with Splunk JS Extension only. 🙂
@kamlesh_vaghela Good Day.
I had tried with JS and HTML button but token gets reset but table is not refreshing.
<button type="button" id="buttonId" class="btn">Reset</button>
require([
'jquery',
'splunkjs/mvc',
'splunkjs/mvc/simplexml/ready!'
], function ($, mvc) {
var tokens = mvc.Components.get("default");
$('#buttonId').on("click", function (e){
tokens.set("SELECTED_PU", "*");
tokens.set("SELECTED_PL", "*");
});
});