Hi @niketn , I would like to know whether the JS which you provided can have a dynamic IDs instead of hardcoding it. If I am applying this JS for more than one panel then instead of me hardcoding the ID for the second one in the JS can this be done for incremental IDs automatically. For example: The below JS works for ID "single" and drilldownTarget. But if I want to apply this to another single value panel as "single1" and another target panel "drilldownTarget1". I may need to code the JS like below. Instead can we dynamically pass the "single" ID to increment along with drilldownTarget where I won't need to update the JS again and again. So the JS works for multiple panel by just providing the ID in the XML not in JS. Let me know your suggestion require(["jquery",
"splunkjs/mvc",
"splunkjs/mvc/simplexml/ready!"],
function($, mvc) {
console.log("Inside Custom Single Drilldown JS");
$(document).on("click","#single", function(e) {
e.preventDefault(); // Prevent default drilldown if needed
var url = window.location.href.split("#")[0] + "#drilldownTarget"; // Add/Replace url fragment
window.location.href = url; // Go to specified position
});
$(document).on("click","#single1", function(e) {
e.preventDefault(); // Prevent default drilldown if needed
var url = window.location.href.split("#")[0] + "#drilldownTarget1"; // Add/Replace url fragment
window.location.href = url; // Go to specified position
});
});
... View more