Splunk Search
Highlighted

Is it possible to have one checkbox that can be used to toggle between 2 difference searches on a dashboard panel?

New Member

I need to select two different searches for my table based on the toggle option. Please help

0 Karma
Highlighted

Re: Is it possible to have one checkbox that can be used to toggle between 2 difference searches on a dashboard panel?

Motivator
0 Karma
Highlighted

Re: Is it possible to have one checkbox that can be used to toggle between 2 difference searches on a dashboard panel?

Motivator

Hi
Look at this search code it might be help

<form>
   <label>TestDynamicPanel</label>
   <fieldset submitButton="false">
     <input type="dropdown" token="show1">
       <label>Dropdown1</label>
       <populatingSearch fieldForLabel="temp" fieldForValue="temp">|gentimes start=-1 | eval temp="ColumnChart" | table temp</populatingSearch>
     </input>
     <input type="dropdown" token="show2">
       <label>Dropdown2</label>
       <populatingSearch fieldForLabel="temp" fieldForValue="temp">|gentimes start=-1 | eval temp="LineChart" | table temp</populatingSearch>
     </input>
     <input type="dropdown" token="show3">
       <label>Dropdown3</label>
       <populatingSearch fieldForLabel="temp" fieldForValue="temp">|gentimes start=-1 | eval temp="Table" | table temp</populatingSearch>
     </input>
   </fieldset>
   <row>
     <panel>
       <chart depends="$show1$">
       <title>Details for $submitted:sourcetype|s$</title>
      <searchString>index=_internal | timechart count</searchString>
         <earliestTime>-15m</earliestTime>
         <latestTime>now</latestTime>
         <option name="charting.chart">column</option>
     </chart>
       <chart depends="$show2$">
       <title>Details for $submitted:sourcetype|s$</title>
      <searchString>index=_internal | timechart count</searchString>
         <earliestTime>-15m</earliestTime>
         <latestTime>now</latestTime>
         <option name="charting.chart">line</option>
     </chart>
       <table depends="$show3$">
         <searchString>index=_internal | timechart count</searchString>
         <earliestTime>-15m</earliestTime>
         <latestTime>now</latestTime>
       </table>
     </panel>
   </row>
 </form>
0 Karma