Splunk Dev

Help me in resetting token with button click for a couple of token on dashboard

DataOrg
Builder

Please help me in resetting token value to "*" on the couple of token from button click.

 

 

<html>
          <center>
            <div>
          <button id="buttonId" class="btn btn-primary">Reset</button>
        </div>
          </center>
        </html>
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", "*"); 
    });
});

 

Labels (1)
Tags (3)
0 Karma
Get Updates on the Splunk Community!

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...

Splunkbase | Splunk Dashboard Examples App for SimpleXML End of Life

The Splunk Dashboard Examples App for SimpleXML will reach end of support on Dec 19, 2024, after which no new ...

Understanding Generative AI Techniques and Their Application in Cybersecurity

Watch On-Demand Artificial intelligence is the talk of the town nowadays, with industries of all kinds ...