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!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...