<?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: Not Reading Dropdown Form Tokens in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148796#M41591</link>
    <description>&lt;P&gt;I've tried with and without the double quotes. It doesn't seem to make a difference here.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jul 2014 13:55:37 GMT</pubDate>
    <dc:creator>willial</dc:creator>
    <dc:date>2014-07-18T13:55:37Z</dc:date>
    <item>
      <title>Not Reading Dropdown Form Tokens</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148794#M41589</link>
      <description>&lt;P&gt;I'm trying to use two dropdowns, one to select a fiscal quarter and one to select the fiscal year. These are both based off of choices rather than search-populated, as so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;fieldset&amp;gt;
  &amp;lt;input type="dropdown" token="qDropMo" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Fiscal Quarter&amp;lt;/label&amp;gt;
      &amp;lt;choice value="Q1"&amp;gt;Q1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Q2"&amp;gt;Q2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Q3"&amp;gt;Q3&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Q4"&amp;gt;Q4&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;Q1&amp;lt;/default&amp;gt;
  &amp;lt;/input&amp;gt;
  &amp;lt;input type="dropdown" token="qDropYr" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Fiscal Year&amp;lt;/label&amp;gt;
      &amp;lt;choice value="2013"&amp;gt;2013&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2014"&amp;gt;2014&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2015"&amp;gt;2015&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;2015&amp;lt;/default&amp;gt;
  &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem I'm having comes from trying to use these. The URL happily contains:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;?form.qDropMo=Q1&amp;amp;form.qDropYr=2015
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but a simple eval statement such as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval quarterStartMo=if($form.qDropMo$="Q1",7,quarterStartMo)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns nothing. Even something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval quarter = $form.qDropMo$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;returns nothing. I'm very confused as to why I can't pull the form information into my search.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 13:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148794#M41589</guid>
      <dc:creator>willial</dc:creator>
      <dc:date>2014-07-18T13:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Not Reading Dropdown Form Tokens</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148795#M41590</link>
      <description>&lt;P&gt;The dropdown values are string and they need to be enclosed within double quotes while using them.&lt;/P&gt;

&lt;P&gt;So change the searches like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval quarterStartMo=if("$form.qDropMo$"="Q1",7,quarterStartMo)

and 

| eval quarter = "$form.qDropMo$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;See this runanywhere sample with your example dropdowns and it works for me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
   &amp;lt;label&amp;gt;Token Issue&amp;lt;/label&amp;gt;
  &amp;lt;fieldset&amp;gt;
    &amp;lt;input type="dropdown" token="qDropMo" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Fiscal Quarter&amp;lt;/label&amp;gt;
      &amp;lt;choice value="Q1"&amp;gt;Q1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Q2"&amp;gt;Q2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Q3"&amp;gt;Q3&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Q4"&amp;gt;Q4&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;Q1&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="qDropYr" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select Fiscal Year&amp;lt;/label&amp;gt;
      &amp;lt;choice value="2013"&amp;gt;2013&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2014"&amp;gt;2014&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2015"&amp;gt;2015&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;2015&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
     &amp;lt;table&amp;gt;
      &amp;lt;title&amp;gt;SampleData&amp;lt;/title&amp;gt;
      &amp;lt;searchString&amp;gt;| stats count as quarterStartMo | eval quarterStartMo=if("$form.qDropMo$"="Q1",7,quarterStartMo)
| eval quarter = "$form.qDropMo$"&amp;lt;/searchString&amp;gt;
      &amp;lt;earliestTime&amp;gt;-15m@m&amp;lt;/earliestTime&amp;gt;
      &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
      &amp;lt;option name="count"&amp;gt;5&amp;lt;/option&amp;gt;     
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Jul 2014 13:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148795#M41590</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-18T13:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Not Reading Dropdown Form Tokens</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148796#M41591</link>
      <description>&lt;P&gt;I've tried with and without the double quotes. It doesn't seem to make a difference here.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 13:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148796#M41591</guid>
      <dc:creator>willial</dc:creator>
      <dc:date>2014-07-18T13:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not Reading Dropdown Form Tokens</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148797#M41592</link>
      <description>&lt;P&gt;I've found the culprit. I have a |stats (etc) line in the full search that is somehow interfering. If I remove the |stats line this works normally. I have no idea why.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 18:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148797#M41592</guid>
      <dc:creator>willial</dc:creator>
      <dc:date>2014-07-18T18:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Not Reading Dropdown Form Tokens</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148798#M41593</link>
      <description>&lt;P&gt;Can you post the full query, in case removing that stats part affects your need. Just ignore this if you're fine without it.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 20:08:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Not-Reading-Dropdown-Form-Tokens/m-p/148798#M41593</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-18T20:08:31Z</dc:date>
    </item>
  </channel>
</rss>

