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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...