<?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 passing variables within a form in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97279#M5318</link>
    <description>&lt;P&gt;I've trying to pass variables within a form.  It does not appear to be working.  The code below produces the dropdown.  The dropdown works.  I need to pass the variable from the dropdown to the rest of the form to produce the charts.  Any idea why the variable is not passed or why the charts are not displayed?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form class="formsearch"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;LABEL&gt;ZHost&lt;/LABEL&gt;&lt;/P&gt;

&lt;P&gt;&lt;SEARCHTEMPLATE&gt;index=MyApp host=host &lt;/SEARCHTEMPLATE&gt;&lt;/P&gt;

&lt;FIELDSET&gt;
   &lt;INPUT type="dropdown" token="host" /&gt;
   &lt;LABEL&gt;Select ZHost&lt;/LABEL&gt;
   &lt;CHOICE value="*"&gt;All&lt;/CHOICE&gt;
   &lt;POPULATINGSEARCH fieldforvalue="zhost" fieldforlabel="zhost"&gt;|inputlookup zhost.csv | fields + zhost&lt;/POPULATINGSEARCH&gt;
  

    &lt;INPUT type="time" /&gt;
        &lt;DEFAULT&gt;Last 7 days&lt;/DEFAULT&gt;
    
&lt;/FIELDSET&gt;

&lt;P&gt;&lt;ROW&gt;&lt;BR /&gt;
    &lt;CHART&gt;&lt;BR /&gt;
      &lt;TITLE&gt;Top Hosts&lt;/TITLE&gt;&lt;BR /&gt;
      &lt;SEARCH&gt;index=myapp host=$zhost$ | top serviceName limit="10"&lt;/SEARCH&gt;&lt;BR /&gt;
      pie&lt;BR /&gt;
      all&lt;BR /&gt;
    &lt;/CHART&gt;&lt;BR /&gt;
  &lt;/ROW&gt;&lt;BR /&gt;
  &lt;ROW&gt;&lt;BR /&gt;
    &lt;CHART&gt;&lt;BR /&gt;
      &lt;TITLE&gt;Top Hosts&lt;/TITLE&gt;&lt;BR /&gt;
      &lt;SEARCH&gt;index=myapp host=$zhost$ | top productName limit="10"&lt;/SEARCH&gt;&lt;BR /&gt;
      bar&lt;BR /&gt;
      all&lt;BR /&gt;
    &lt;/CHART&gt;&lt;BR /&gt;
  &lt;/ROW&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Mar 2012 15:58:39 GMT</pubDate>
    <dc:creator>DTERM</dc:creator>
    <dc:date>2012-03-20T15:58:39Z</dc:date>
    <item>
      <title>passing variables within a form</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97279#M5318</link>
      <description>&lt;P&gt;I've trying to pass variables within a form.  It does not appear to be working.  The code below produces the dropdown.  The dropdown works.  I need to pass the variable from the dropdown to the rest of the form to produce the charts.  Any idea why the variable is not passed or why the charts are not displayed?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form class="formsearch"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;LABEL&gt;ZHost&lt;/LABEL&gt;&lt;/P&gt;

&lt;P&gt;&lt;SEARCHTEMPLATE&gt;index=MyApp host=host &lt;/SEARCHTEMPLATE&gt;&lt;/P&gt;

&lt;FIELDSET&gt;
   &lt;INPUT type="dropdown" token="host" /&gt;
   &lt;LABEL&gt;Select ZHost&lt;/LABEL&gt;
   &lt;CHOICE value="*"&gt;All&lt;/CHOICE&gt;
   &lt;POPULATINGSEARCH fieldforvalue="zhost" fieldforlabel="zhost"&gt;|inputlookup zhost.csv | fields + zhost&lt;/POPULATINGSEARCH&gt;
  

    &lt;INPUT type="time" /&gt;
        &lt;DEFAULT&gt;Last 7 days&lt;/DEFAULT&gt;
    
&lt;/FIELDSET&gt;

&lt;P&gt;&lt;ROW&gt;&lt;BR /&gt;
    &lt;CHART&gt;&lt;BR /&gt;
      &lt;TITLE&gt;Top Hosts&lt;/TITLE&gt;&lt;BR /&gt;
      &lt;SEARCH&gt;index=myapp host=$zhost$ | top serviceName limit="10"&lt;/SEARCH&gt;&lt;BR /&gt;
      pie&lt;BR /&gt;
      all&lt;BR /&gt;
    &lt;/CHART&gt;&lt;BR /&gt;
  &lt;/ROW&gt;&lt;BR /&gt;
  &lt;ROW&gt;&lt;BR /&gt;
    &lt;CHART&gt;&lt;BR /&gt;
      &lt;TITLE&gt;Top Hosts&lt;/TITLE&gt;&lt;BR /&gt;
      &lt;SEARCH&gt;index=myapp host=$zhost$ | top productName limit="10"&lt;/SEARCH&gt;&lt;BR /&gt;
      bar&lt;BR /&gt;
      all&lt;BR /&gt;
    &lt;/CHART&gt;&lt;BR /&gt;
  &lt;/ROW&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2012 15:58:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97279#M5318</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2012-03-20T15:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: passing variables within a form</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97280#M5319</link>
      <description>&lt;P&gt;Hi dterm,&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Capitalization matters in Splunk tags.  Use populatingSearch, searchTemplate, fieldForValue, and fieldForLabel.&lt;/LI&gt;
&lt;LI&gt;I don't think you need the searchTemplate entry anyway; my search works without it.&lt;/LI&gt;
&lt;LI&gt;Pass $host$ instead of $zhost$ to your search.&lt;/LI&gt;
&lt;LI&gt;I changed the tag search to searchString in your chart section and got a chart to display for my sample data.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Let me know if this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2012 17:00:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97280#M5319</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-03-20T17:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: passing variables within a form</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97281#M5320</link>
      <description>&lt;P&gt;Worked great!!  thanks so much!!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 18:11:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/passing-variables-within-a-form/m-p/97281#M5320</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2012-03-22T18:11:52Z</dc:date>
    </item>
  </channel>
</rss>

