<?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 How to dynamically set a variable for Dashboard Panel Title? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-set-a-variable-for-Dashboard-Panel-Title/m-p/649558#M224586</link>
    <description>&lt;P&gt;I am looking to dynamically update the Splunk Dashboard panel title, depending on options I've chosen from a dropdown menu in Splunk Dashboard.&lt;/P&gt;&lt;P&gt;I've tried the following&lt;/P&gt;&lt;PRE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel1: (Hardware: $hardware1$ - $unit_used$&amp;lt;/title&amp;gt;
        ...
        &amp;lt;search base="main_search"&amp;gt;
          &amp;lt;query&amp;gt;
          ...

          | eval _unit_used = "ms"
  
          &amp;lt;/query&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="unit_used"&amp;gt;$result._unit_used$&amp;lt;/set&amp;gt;  
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when the script runs, I am seeing&lt;/P&gt;&lt;P&gt;"Hardware: abc - $result.&lt;EM&gt;unit_&lt;/EM&gt;used$".&lt;/P&gt;&lt;P&gt;instead of seeing&lt;/P&gt;&lt;P&gt;"Hardware: abc - ms"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of achieving this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 22:04:47 GMT</pubDate>
    <dc:creator>GaryZ</dc:creator>
    <dc:date>2023-07-06T22:04:47Z</dc:date>
    <item>
      <title>How to dynamically set a variable for Dashboard Panel Title?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-set-a-variable-for-Dashboard-Panel-Title/m-p/649558#M224586</link>
      <description>&lt;P&gt;I am looking to dynamically update the Splunk Dashboard panel title, depending on options I've chosen from a dropdown menu in Splunk Dashboard.&lt;/P&gt;&lt;P&gt;I've tried the following&lt;/P&gt;&lt;PRE&gt;  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel1: (Hardware: $hardware1$ - $unit_used$&amp;lt;/title&amp;gt;
        ...
        &amp;lt;search base="main_search"&amp;gt;
          &amp;lt;query&amp;gt;
          ...

          | eval _unit_used = "ms"
  
          &amp;lt;/query&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="unit_used"&amp;gt;$result._unit_used$&amp;lt;/set&amp;gt;  
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when the script runs, I am seeing&lt;/P&gt;&lt;P&gt;"Hardware: abc - $result.&lt;EM&gt;unit_&lt;/EM&gt;used$".&lt;/P&gt;&lt;P&gt;instead of seeing&lt;/P&gt;&lt;P&gt;"Hardware: abc - ms"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of achieving this?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 22:04:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-set-a-variable-for-Dashboard-Panel-Title/m-p/649558#M224586</guid>
      <dc:creator>GaryZ</dc:creator>
      <dc:date>2023-07-06T22:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically set a variable for Dashboard Panel Title?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-set-a-variable-for-Dashboard-Panel-Title/m-p/649562#M224588</link>
      <description>&lt;P&gt;I suspect the title is set before any searches run so there are no results from which to pull a field value.&lt;/P&gt;&lt;P&gt;OTOH, if the value for the title comes from a drop-down then you should use a form token instead of a results token.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$form._unit_used$&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 07 Jul 2023 00:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-dynamically-set-a-variable-for-Dashboard-Panel-Title/m-p/649562#M224588</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-07-07T00:18:19Z</dc:date>
    </item>
  </channel>
</rss>

