<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic value display in the Panel Title in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184817#M44825</link>
    <description>&lt;P&gt;thanks Nawneel!&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2015 18:45:18 GMT</pubDate>
    <dc:creator>nekbote</dc:creator>
    <dc:date>2015-05-19T18:45:18Z</dc:date>
    <item>
      <title>Dynamic value display in the Panel Title?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184810#M44818</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I need to display dynamic value in the panel title. The dynamic value needs to come from the time range label.&lt;/P&gt;
&lt;P&gt;I have a custom time picker whose partial code snippet is below...&lt;/P&gt;
&lt;P&gt;&amp;lt;form&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Demand Billed Dashboard-DBQuery Clone&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;&lt;BR /&gt;&amp;lt;input type="dropdown" token="field1" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Select Time Range&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;choice value="1"&amp;gt;1 day ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;&amp;lt;choice value="2"&amp;gt;2 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;default&amp;gt;1&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/fieldset&amp;gt;&lt;BR /&gt;&amp;lt;row&amp;gt;&lt;BR /&gt;&amp;lt;panel&amp;gt;&lt;BR /&gt;&amp;lt;table&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;Demand Billed - $field1$&amp;lt;/title&amp;gt;&lt;/P&gt;
&lt;P&gt;In the title tag with the '$field1$' i am able to display the value [1 or 2 depending upon what is selected as time range].&lt;/P&gt;
&lt;P&gt;How can we display the text "1 day ago" corresponding to value="1" , i want to get the text and display it based on the time range selection instead of the value.&lt;/P&gt;
&lt;P&gt;Please guide me.&lt;/P&gt;
&lt;P&gt;Requirement ---&amp;gt; title should be displayed as&lt;/P&gt;
&lt;P&gt;Demand Billed - 1 day ago&lt;BR /&gt;Demand Billed - 2 days ago&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 14:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184810#M44818</guid>
      <dc:creator>nekbote</dc:creator>
      <dc:date>2022-08-24T14:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184811#M44819</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
try like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
&amp;lt;label&amp;gt;Demand Billed Dashboard-DBQuery Clone&amp;lt;/label&amp;gt;

&amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
&amp;lt;input type="dropdown" token="field1" searchWhenChanged="true"&amp;gt;
&amp;lt;label&amp;gt;Select Time Range&amp;lt;/label&amp;gt;
&amp;lt;choice value="1 day ago"&amp;gt;1 day ago&amp;lt;/choice&amp;gt;
&amp;lt;choice value="2 days ago"&amp;gt;2 days ago&amp;lt;/choice&amp;gt; 
&amp;lt;default&amp;gt;1 day ago&amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt; 
&amp;lt;/fieldset&amp;gt;
&amp;lt;row&amp;gt;
&amp;lt;panel&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;title&amp;gt;Demand Billed - $field1$&amp;lt;/title&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;form&amp;gt;
 &amp;lt;label&amp;gt;Demand Billed Dashboard-DBQuery Clone&amp;lt;/label&amp;gt;

 &amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
 &amp;lt;input type="dropdown" token="field1" searchWhenChanged="true"&amp;gt;
 &amp;lt;label&amp;gt;Select Time Range&amp;lt;/label&amp;gt;
 &amp;lt;choice value="1 day ago"&amp;gt; 1 &amp;lt;/choice&amp;gt;
 &amp;lt;choice value="2 days ago"&amp;gt; 2 &amp;lt;/choice&amp;gt; 
 &amp;lt;default&amp;gt;1 day ago&amp;lt;/default&amp;gt;
 &amp;lt;/input&amp;gt; 
 &amp;lt;/fieldset&amp;gt;
 &amp;lt;row&amp;gt;
 &amp;lt;panel&amp;gt;
 &amp;lt;table&amp;gt;
 &amp;lt;title&amp;gt;Demand Billed - $field1$&amp;lt;/title&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;because $field1$ don't take the &lt;CODE&gt;label&lt;/CODE&gt; but take the &lt;CODE&gt;value&lt;/CODE&gt;&lt;BR /&gt;
please forgive my english.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 23:06:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184811#M44819</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2015-05-08T23:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184812#M44820</link>
      <description>&lt;P&gt;Thanks gyslainlatsa for the information. But i dont think this solution works and the reason being in my search  query i still need to use the token $field1$ and your suggested solution will not work.&lt;/P&gt;

&lt;P&gt;My searc hquery makes use of the token in the below date condition.&lt;/P&gt;

&lt;P&gt;VARCHAR_FORMAT(CURRENT TIMESTAMP - $field1$  day, 'YYYYMMDD')&lt;/P&gt;

&lt;P&gt;Do you have any other suggestion of getting around it. &lt;/P&gt;

&lt;P&gt;Also just an addition , yes i understand $field1$  takes value and not label and i am requesting how to get the label.&lt;/P&gt;</description>
      <pubDate>Fri, 08 May 2015 23:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184812#M44820</guid>
      <dc:creator>nekbote</dc:creator>
      <dc:date>2015-05-08T23:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184813#M44821</link>
      <description>&lt;P&gt;Hi nekbote &lt;/P&gt;

&lt;P&gt;It is simple &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;form&amp;gt;
&amp;lt;label&amp;gt;Demand Billed Dashboard-DBQuery Clone&amp;lt;/label&amp;gt;
&amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
 &amp;lt;input type="time" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select a time:&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;Last 24 hours&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
&amp;lt;/fieldset&amp;gt;
&amp;lt;row&amp;gt;
&amp;lt;panel&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;title&amp;gt;Demand Billed Demand Billed  there are  $earliest$&amp;lt;/title&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also use  the following &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;title&amp;gt;Demand Billed Demand Billed  between $earliest$ and  $latest$&amp;lt;/title&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where :&lt;BR /&gt;
 -1d@d represent 1 day ago&lt;BR /&gt;
 -2d@d  represent 2 day ago&lt;/P&gt;</description>
      <pubDate>Sat, 09 May 2015 09:23:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184813#M44821</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2015-05-09T09:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184814#M44822</link>
      <description>&lt;P&gt;Hi Chimell,&lt;/P&gt;

&lt;P&gt;Thanks for the suggestion but it does not work in my case.&lt;/P&gt;

&lt;P&gt;Mine is custom time picker which provides 1-14 day time selection [earliest and latest alone does not work]. I want to display the the label corresponding to the time picker value. in your suggestion , i want to display the value 1 day ago as label and not -1d@d.&lt;/P&gt;

&lt;P&gt;&amp;lt;form&amp;gt;&lt;BR /&gt;
&amp;lt;label&amp;gt;Demand Billed Dashboard-DBQuery Clone&amp;lt;/label&amp;gt;&lt;BR /&gt;
&amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;&lt;BR /&gt;
&amp;lt;input type="dropdown" token="field1" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;
&amp;lt;label&amp;gt;Select Time Range&amp;lt;/label&amp;gt;&lt;BR /&gt;
&amp;lt;choice value="1"&amp;gt;1 day ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
&amp;lt;choice value="2"&amp;gt;2 days ago&amp;lt;/choice&amp;gt; &lt;BR /&gt;
 &amp;lt;choice value="3"&amp;gt;3 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="4"&amp;gt;4 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="5"&amp;gt;5 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="6"&amp;gt;6 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="7"&amp;gt;7 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="8"&amp;gt;8 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="9"&amp;gt;9 days ago&amp;lt;/choice&amp;gt;&lt;BR /&gt;
&amp;lt;default&amp;gt;1&amp;lt;/default&amp;gt;&lt;BR /&gt;
&amp;lt;/input&amp;gt; &lt;BR /&gt;
&amp;lt;/fieldset&amp;gt;&lt;BR /&gt;
&amp;lt;row&amp;gt;&lt;BR /&gt;
&amp;lt;panel&amp;gt;&lt;BR /&gt;
&amp;lt;table&amp;gt;&lt;BR /&gt;
&amp;lt;title&amp;gt;Demand Billed - $field1$&amp;lt;/title&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2015 03:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184814#M44822</guid>
      <dc:creator>nekbote</dc:creator>
      <dc:date>2015-05-11T03:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184815#M44823</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;Any other pointers as to how this can be achieved. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2015 17:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184815#M44823</guid>
      <dc:creator>nekbote</dc:creator>
      <dc:date>2015-05-11T17:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184816#M44824</link>
      <description>&lt;P&gt;we can achieve this using Javascript.  where we can capture dropdown label and render it in token in panel header.&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 11:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184816#M44824</guid>
      <dc:creator>nawneel</dc:creator>
      <dc:date>2015-05-13T11:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184817#M44825</link>
      <description>&lt;P&gt;thanks Nawneel!&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2015 18:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184817#M44825</guid>
      <dc:creator>nekbote</dc:creator>
      <dc:date>2015-05-19T18:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184818#M44826</link>
      <description>&lt;P&gt;This worked for me with time pickers.  It is not pretty while it waits for data to load but once it gets the field1 values it works.&lt;/P&gt;

&lt;P&gt;Next I want to play with the time format.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 21:45:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184818#M44826</guid>
      <dc:creator>gbower333</dc:creator>
      <dc:date>2016-03-22T21:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184819#M44827</link>
      <description>&lt;P&gt;$field1.earliest$ to $field1.latest$&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 21:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184819#M44827</guid>
      <dc:creator>gbower333</dc:creator>
      <dc:date>2016-03-22T21:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184820#M44828</link>
      <description>&lt;P&gt;So, I use that at the end of my title.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 21:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184820#M44828</guid>
      <dc:creator>gbower333</dc:creator>
      <dc:date>2016-03-22T21:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184821#M44829</link>
      <description>&lt;P&gt;This is now possible to do in SimpleXML.&lt;/P&gt;

&lt;P&gt;Modify your input, and add a change action&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;default&amp;gt;1&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;set token="display"&amp;gt;$label$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The change your panel title to use the new token&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;title&amp;gt;Demand Billed - $display$&amp;lt;/title&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Aug 2017 15:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/184821#M44829</guid>
      <dc:creator>russellliss</dc:creator>
      <dc:date>2017-08-28T15:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic value display in the Panel Title</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/610601#M50060</link>
      <description>&lt;P&gt;While this works perfectly for any number within last 24 hours but when I change time to 7 days or something else, title shows the "&lt;STRONG&gt;...in the Custom time&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;Any fix for this ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 03:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dynamic-value-display-in-the-Panel-Title/m-p/610601#M50060</guid>
      <dc:creator>dm1</dc:creator>
      <dc:date>2022-08-24T03:40:10Z</dc:date>
    </item>
  </channel>
</rss>

