Dashboards & Visualizations

To use two different search input fields in same view

shambupujar
New Member

Hi,

I currently got three charts in one of the views and use time input field as time range to be searched for. I have designed this view using simple XML. What I require is to add two more charts to same view, but the time value for this search should be different one. Hence I should be able to add another time input and another search button that picks up this time input. Any help on this appreciated.

Tags (1)
0 Karma

woodcock
Esteemed Legend

Like this:

<fieldset autoRun="true" submitButton="false">
  <input type="time" token="time_tok1" searchWhenChanged="true">
    <label>First TimePicker</label>
    <default>Last 24 hours</default>
  </input>
  <input type="time" token="time_tok2" searchWhenChanged="true">
    <label>Second TimePicker</label>
    <default>Last 24 hours</default>
  </input>
</fieldset>
<search id="first_search">
  <query>First Search Here</query>
  <earliest>$time_tok1.earliest$</earliest>
  <latest>$time_tok1.latest$</latest>
</search>
<search id="second_search">
  <query>Second Search Here</query>
  <earliest>$time_tok2.earliest$</earliest>
  <latest>$time_tok2.latest$</latest>
</search>
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Customer Survey!

If you use Splunk Observability Cloud, we invite you to share your valuable insights with us through a brief ...

Happy CX Day, Splunk Community!

Happy CX Day, Splunk Community! CX stands for Customer Experience, and today, October 3rd, is CX Day — a ...

.conf23 | Get Your Cybersecurity Defense Analyst Certification in Vegas

We’re excited to announce a new Splunk certification exam being released at .conf23! If you’re going to Las ...