<?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: Pass Variable to Panel Title. in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475829#M45846</link>
    <description>&lt;P&gt;It gives one result , but varies depending on customer choosen.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 03:39:54 GMT</pubDate>
    <dc:creator>Anantha123</dc:creator>
    <dc:date>2019-11-07T03:39:54Z</dc:date>
    <item>
      <title>Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475826#M45843</link>
      <description>&lt;P&gt;Hi All, &lt;/P&gt;

&lt;P&gt;I have a requirement, where I need to show Query Result displayed to Panel Title. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=foo &lt;BR /&gt;
|timechart count as devAppCount&lt;BR /&gt;
|  eval devAppC=10*devAppCount &lt;BR /&gt;
| table devAppC&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now I want to show the result of devAppC to Panel Title in UI. &lt;BR /&gt;
Please help  me. &lt;/P&gt;

&lt;P&gt;Thanks &lt;BR /&gt;
Anantha.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 17:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475826#M45843</guid>
      <dc:creator>Anantha123</dc:creator>
      <dc:date>2019-11-05T17:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475827#M45844</link>
      <description>&lt;P&gt;Hi @Anantha123 ,&lt;/P&gt;

&lt;P&gt;Put this query inside a hidden panel/row. On search done action, set a token to the `devAppcz value and use that token as panel title.&lt;BR /&gt;
Try the below code,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row depends="$hidden$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=foo |timechart count as devAppCount | eval devAppC=10*devAppCount | head 1 | table devAppC&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="panel_title"&amp;gt;$result.devAppC$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;$panel_title$&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;|makeresults | eval title="$panel_title$" | table title&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1d@d&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Accept the answer if it helps.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 21:45:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475827#M45844</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-05T21:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475828#M45845</link>
      <description>&lt;P&gt;Does your query return only one result? If it returns more than one result do you take click input from the user?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 22:11:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475828#M45845</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2019-11-05T22:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475829#M45846</link>
      <description>&lt;P&gt;It gives one result , but varies depending on customer choosen.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 03:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475829#M45846</guid>
      <dc:creator>Anantha123</dc:creator>
      <dc:date>2019-11-07T03:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475830#M45847</link>
      <description>&lt;P&gt;I tried this, but getting "$result.devAppC$"  as a result but not value.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 03:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475830#M45847</guid>
      <dc:creator>Anantha123</dc:creator>
      <dc:date>2019-11-07T03:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475831#M45848</link>
      <description>&lt;P&gt;What happenes when you have more than 1 value in the result? What should be in the title? The first value or the last?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 05:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475831#M45848</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-07T05:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475832#M45849</link>
      <description>&lt;P&gt;Hi @Anantha123 ,&lt;/P&gt;

&lt;P&gt;I have updated my answer.&lt;BR /&gt;
please answer the comments from @sandeepmakkena and @arjunpkishore5 , so that we can provide better solution.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 11:05:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475832#M45849</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-07T11:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475833#M45850</link>
      <description>&lt;P&gt;Thanks Gaurav . This worked. Actly I aslo tried the same code   to initiate the token but was trying to get the value from same Panel. This has to be obtained by different panel (hidden as you mentioned) . Thanks for the help. Wish we had a solution to get token value from same panel . &lt;/P&gt;

&lt;P&gt;Thanks &lt;BR /&gt;
Anantha.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 16:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475833#M45850</guid>
      <dc:creator>Anantha123</dc:creator>
      <dc:date>2019-11-08T16:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Variable to Panel Title.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475834#M45851</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It is also possible, without hidden panel&lt;BR /&gt;
If your search is taking time to execute, so till your search execution is not completed, you will see the token variable as panel title.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;
     &amp;lt;panel&amp;gt;
       &amp;lt;title&amp;gt;$panel_title$&amp;lt;/title&amp;gt;
       &amp;lt;table&amp;gt;
         &amp;lt;search&amp;gt;
           &amp;lt;query&amp;gt;index=foo |timechart count as devAppCount | eval devAppC=10*devAppCount | head 1 | table devAppC&amp;lt;/query&amp;gt;
           &amp;lt;earliest&amp;gt;-1h@h&amp;lt;/earliest&amp;gt;
           &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
           &amp;lt;done&amp;gt;
             &amp;lt;set token="panel_title"&amp;gt;$result.devAppC$&amp;lt;/set&amp;gt;
           &amp;lt;/done&amp;gt;
         &amp;lt;/search&amp;gt;
       &amp;lt;/table&amp;gt;
     &amp;lt;/panel&amp;gt;
   &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Nov 2019 21:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Pass-Variable-to-Panel-Title/m-p/475834#M45851</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-08T21:59:36Z</dc:date>
    </item>
  </channel>
</rss>

