Splunk Dev

Dashboard XML Hiding/Displaying Panels

jjburke306
Loves-to-Learn Lots

Hi all,

I have been trying to create a Dashboard for searches based on a specific ID number (this is intended to help team members find connected data, who aren't proficient in writing searches). The panels are backed by  some extensive search macros. Anyways, this is a two part question regarding XML development:

First, I was wondering if there was a way via XML to check against null return on the search, so that I can hide panels that return nothing, and display only those which return a value from the search?

Second, how would one actually go about using XML to hide panels or display panels, in the case that a search returns no results or a valid result?  Thank you.

Labels (2)
Tags (4)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Panels can be shown/hidden depending on the presence of a token. This token could be set/unset based on the number of results in the query of the panel

 

<panel depends="$results1$">
...

 

0 Karma

jjburke306
Loves-to-Learn Lots

Hi there,

How would you go about actually checking for a certain number of results?

Thanks

0 Karma

jjburke306
Loves-to-Learn Lots
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
   <search>
          <query>...</query>
          <earliest>...</earliest>
          <latest>..</latest>
          <done>
            <set token="search_results">$job.resultCount$</set>
          </done>
    </search>
0 Karma

jjburke306
Loves-to-Learn Lots

Thx a ton. @ITWhisperer 

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...