Dashboards & Visualizations

How do you update the displayed value of an input form based on a token in the same dashboard.

logfilleraccoun
Engager

Assume I am using Simple XML dashboards/form In Splunk 6.1 and higher.

I reveal a drilldown panel after the user selects a drilldown value from a chart in the same dashboard. The revealed drilldown panel has a search box that filter the results in a table. When the user selects the drilldown value in the first chart, it would be really helpful if the input form on the drilldown panel could be populated with the selected drilldown value. Is this possible? I want the flexibility for the user to select new drilldown values and fields even after the initial drilldown value was selected.

Right now, the input form for "exe_stats" will not show the drilldown value when the user clicks the value in the first chart.

Sample code

In first chart that is always visible:
<drilldown target="_blank">
  <condition field="*">
    &lt;set token="exe_stats"&gt;$click.value$&lt;/set&gt;
  </condition>
</drilldown>


In the drilldown chart:
&lt;panel depends="$exe_stats$"&gt;
 ...
    <input searchWhenChanged="true" token="exe_stats" type="dropdown"">
        <label>Search Value (use &quot;*&quot; as wildcards)</label>
        <search>
          <query>| inputlookup ...</query>
        </search>
        <choice value="*">All</choice>
        <fieldForLabel>exe_dd_value</fieldForLabel>
        <fieldForValue>exe_dd_value</fieldForValue>
        <allowCustomValues>true</allowCustomValues>
      </input>
      <table>
        &lt;search&gt;&lt;query&gt;index=.... ExeName="$exe_stats$" | &lt;/query&gt;&lt;/search&gt;
</panel>
0 Karma
1 Solution

aholzer
Motivator

Add this below your other "set" tag:

  <set token="form.exe_stats">$click.value$</set>

This will set the "exe_stats" form token for you.

Hope this helps.

View solution in original post

aholzer
Motivator

Add this below your other "set" tag:

  <set token="form.exe_stats">$click.value$</set>

This will set the "exe_stats" form token for you.

Hope this helps.

logfilleraccoun
Engager

Confirmed. Thank you so much. Seems obvious now.

0 Karma

logfilleraccoun
Engager

Apologies for the code getting reformatted. I can't seem to figure out how to stop that.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...