Dashboards & Visualizations

How to change the title name when selecting data in the drop-down box?

flzhang132
Explorer

How to change the title name when selecting data in the drop-down box
When selecting 201808, the name of the title is 8 month of project pfee.
When choosing 201807, the name of the title is 7 month of project pfee, and so on.
alt text

0 Karma
1 Solution

renjith_nair
Legend

@flzhang132,

Added to the previous dashboard example :

<form>
  <init>
    <eval token="prev_month">strftime(relative_time(now(),"-1mon"),"%Y%m")</eval>
  </init>
  <fieldset submitButton="false">
    <input type="dropdown" token="ymmon">
      <label>Date</label>
      <choice value="ym201801">201801</choice>
      <choice value="ym201802">201802</choice>
      <choice value="ym201803">201803</choice>
      <choice value="ym201804">201804</choice>
      <choice value="ym201805">201805</choice>
      <choice value="ym201806">201806</choice>
      <choice value="ym201807">201807</choice>
      <choice value="ym201808">201808</choice>
      <choice value="ym201809">201809</choice>
      <choice value="ym201810">201810</choice>
      <default>$prev_month$</default>
      <initialValue>$prev_month$</initialValue>
      <change>
        <eval token="mon_number">strftime(strptime($value$,"%Y%m"),"%m")</eval>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <title>$mon_number$  months of project fee</title>
      <table>
        <search>
          <query>| makeresults|eval value="Some Project Values"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

0 Karma

renjith_nair
Legend

@flzhang132,

Added to the previous dashboard example :

<form>
  <init>
    <eval token="prev_month">strftime(relative_time(now(),"-1mon"),"%Y%m")</eval>
  </init>
  <fieldset submitButton="false">
    <input type="dropdown" token="ymmon">
      <label>Date</label>
      <choice value="ym201801">201801</choice>
      <choice value="ym201802">201802</choice>
      <choice value="ym201803">201803</choice>
      <choice value="ym201804">201804</choice>
      <choice value="ym201805">201805</choice>
      <choice value="ym201806">201806</choice>
      <choice value="ym201807">201807</choice>
      <choice value="ym201808">201808</choice>
      <choice value="ym201809">201809</choice>
      <choice value="ym201810">201810</choice>
      <default>$prev_month$</default>
      <initialValue>$prev_month$</initialValue>
      <change>
        <eval token="mon_number">strftime(strptime($value$,"%Y%m"),"%m")</eval>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <title>$mon_number$  months of project fee</title>
      <table>
        <search>
          <query>| makeresults|eval value="Some Project Values"</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...