Splunk Search

How to pass selected value from drop down list to statistic table

mb_30
New Member

hi,

I created a static table then I am retrieving minutes from the table to a drop-down-list,
then I am trying to use the values from the dro-list to present another static table based on the drop-down selection.
The static table code see in the screenshot.
Please advise, I am trying to resolve this issue several days.

I based it on this tutorial but the base search was not working for me https://www.youtube.com/watch?v=cdWXKBzPZ78

this is my main search --> version error* | table date_year,date_month,date_mday,date_hour,date_minute,date_second ,version,host,error,source | rename date_year as year , date_month as month ,date_mday as day ,date_hour as hour,date_minute as minute ,date_second as second| sort year ,day,hour,minute,second |fillnull value="not defined" year,version,error

<form>![alt text][1]
  <label>Dashboard test</label>
  <fieldset submitButton="true">
    <input type="dropdown" token="minute" searchWhenChanged="false">
      <label>Minutes</label>
      <search>
        <query>version error* | table date_year,date_month,date_mday,date_hour,date_minute,date_second ,version,host,error,source | rename date_year as year , date_month as month ,date_mday as day ,date_hour as hour,date_minute as minute ,date_second as second| sort year ,day,hour,minute,second |fillnull value="not defined" year,version,error | stats count by minute</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
      <fieldForLabel>minute</fieldForLabel>
      <fieldForValue>minute</fieldForValue>
      <choice value="*">All</choice>
      <default>*</default>
      <initialValue>*</initialValue>
    </input>
    <input type="dropdown" searchWhenChanged="false" token="hour">
      <label>Hours</label>
      <choice value="*">All</choice>
      <search>
        <query>version error* | table date_year,date_month,date_mday,date_hour,date_minute,date_second ,version,host,error,source | rename date_year as year , date_month as month ,date_mday as day ,date_hour as hour,date_minute as minute ,date_second as second| sort day,hour,minute,second |fillnull value="not defined" year,version,error | stats count by hour</query>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </search>
      <fieldForLabel>hour</fieldForLabel>
      <fieldForValue>hour</fieldForValue>
      <default>*</default>
      <initialValue>*</initialValue>
    </input>
  </fieldset>
  <row>
    <panel>
      <single>
        <title>Error count</title>
        <search>
          <query>version error*    minute=$minute$ hour=$hour$ | table date_year,date_month,date_mday,date_minute,date_second ,version,host,error,source | mvexpand error| rename date_year as year , date_month as month ,date_mday as day ,date_hour as hour,date_minute as minute ,date_second as second| sort day,minute,second |fillnull value=\"not_defined\" year,version,error | stats count by error</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="numberPrecision">0</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
        <option name="linkView">search</option>
      </single>
    </panel>
    <panel>
      <table>
        <title>Result table</title>
        <search>
          <query>version error*  minute=$minute$ AND hour=$hour$ | table date_year,date_month,date_mday,date_hour,date_minute,date_second ,version,host,error,source | rename date_year as year , date_month as month ,date_mday as day ,date_hour as hour,date_minute as minute ,date_second as second| sort year ,day,hour,minute,second |fillnull value="not defined" year,version,error</query>
          <earliest>-30d@d</earliest>
          <latest>now</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="drilldown">cell</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>
      <title>Table</title>
      <table>
        <title>Error table</title>
        <search>
          <query>version error* | table date_year,date_month,date_mday,date_hour,date_minute,date_second ,version,host,error,source | rename date_year as year , date_month as month ,date_mday as day ,date_hour as hour,date_minute as minute ,date_second as second| sort year ,day,hour,minute,second |fillnull value="not defined" year,version,error</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="wrap">undefined</option>
        <option name="rowNumbers">undefined</option>
        <option name="drilldown">row</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">50</option>
      </table>
    </panel>
  </row>
</form>
Tags (1)
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...