<?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: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268447#M16988</link>
    <description>&lt;P&gt;I came here because this was my issue.  It turns out that Splunk had set a " " option for me.  I deleted this and it works, now.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 10:57:07 GMT</pubDate>
    <dc:creator>ntennant</dc:creator>
    <dc:date>2020-03-25T10:57:07Z</dc:date>
    <item>
      <title>How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268440#M16981</link>
      <description>&lt;P&gt;Hi I'm trying to create a simple search input as a drop-down. I've defined static values for the drop-down. The problem I'm having is that each character in my value is being separated by a space when inserted into the search. Here's my entire search dashboard definition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Riva Cloud Diagnostics By Time&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="time_tok"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-1m&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="pod_tok" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;pod&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;choice value="*"&amp;gt;Any&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="na5"&amp;gt;na5&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="xi5"&amp;gt;xi5&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="yi5"&amp;gt;yi5&amp;lt;/choice&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;search&amp;gt;
          &amp;lt;query&amp;gt;index="rc-diagnostics" pod="$pod_tok$" sourcetype=RivaDiagnostics* | table "_time", "pod", "message",  "referenceId", "exception", "errorDetails", "thread","processId", "levelInt", "userName"  | sort -_time | head 500&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$time_tok.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$time_tok.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;30&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When one of my "pod_tok" values are selected, in the search the values are being added with extra spaces.&lt;/P&gt;

&lt;P&gt;For example, if I select 'na5' the resulting search looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="rc-diagnostics" pod="n a 5" sourcetype=RivaDiagnostics* | table "_time", "pod", "message",  "referenceId", "exception", "errorDetails", "thread","processId", "levelInt", "userName"  | sort -_time | head 500
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which of course is incorrect.&lt;/P&gt;

&lt;P&gt;How can I define my drop-down input properly so that the values are entered into my search without the extraneous spaces?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 17:43:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268440#M16981</guid>
      <dc:creator>richardAtOmni</dc:creator>
      <dc:date>2017-02-02T17:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268441#M16982</link>
      <description>&lt;P&gt;In order to post this question, I opened my dashboard in "Edit Source" mode, so that I could paste the XML into this ticket. After posting, I exited "Edit Source" mode, and to my surprise, the inputs started working as expected, without the additional spaces!&lt;/P&gt;

&lt;P&gt;Maybe this is a bug in Splunk? But if anyone else encounters this, try entering "Edit Source" mode, then exiting. That seemed to have done the trick for me.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 18:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268441#M16982</guid>
      <dc:creator>richardAtOmni</dc:creator>
      <dc:date>2017-02-02T18:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268442#M16983</link>
      <description>&lt;P&gt;That is really odd. &lt;/P&gt;

&lt;P&gt;What version of Splunk Enterprise are you running?&lt;/P&gt;

&lt;P&gt;Also, is the XML you posted straight from the XML web editor in Splunk? If not, can you post the XML straight from the editor in the browser so we can confirm it is not munging anything?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 18:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268442#M16983</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-02-02T18:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268443#M16984</link>
      <description>&lt;P&gt;Not sure why the extra space is coming through in token but can you please try to do these to see if it improves anything:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Replace &lt;CODE&gt;pod="$pod_tok$"&lt;/CODE&gt; in your query to &lt;CODE&gt;pod=$pod_tok|s$&lt;/CODE&gt; if you want to wrap the token values with quotes around it. It might not help much but shall be the preferred way of "quoting" the token.&lt;/LI&gt;
&lt;LI&gt;Remove the quotes around the field names in this part &lt;CODE&gt;table "_time", "pod", "message",  "referenceId", "exception", "errorDetails", "thread","processId", "levelInt", "userName"&lt;/CODE&gt; as fieldNames shall be recognized without the quotes too.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Try with &lt;CODE&gt;pod=$pod_tok|n$&lt;/CODE&gt; once which means no encoding. This is just a trial to see how does it change anything, if at all.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 18:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268443#M16984</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2017-02-02T18:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268444#M16985</link>
      <description>&lt;P&gt;Hi, the splunk version is:&lt;/P&gt;

&lt;P&gt;Splunk Version&lt;BR /&gt;
6.5.1&lt;BR /&gt;
Splunk Build&lt;BR /&gt;
f74036626f0c&lt;/P&gt;

&lt;P&gt;And yes, the XML was straight from the web editor.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 18:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268444#M16985</guid>
      <dc:creator>richardAtOmni</dc:creator>
      <dc:date>2017-02-02T18:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268445#M16986</link>
      <description>&lt;P&gt;Thanks for your suggestions. If you haven't seen my other reply yet, the issue went away as soon as I left the splunk "source edit" mode. I have no idea why it happened, but it is resolved for me now. Thank you for your attention anyway!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 18:58:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268445#M16986</guid>
      <dc:creator>richardAtOmni</dc:creator>
      <dc:date>2017-02-02T18:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268446#M16987</link>
      <description>&lt;P&gt;In case this helps the Splunk team find the problem, I was able to reproduce the problem this way:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;create the input as a "text" field, save.&lt;/LI&gt;
&lt;LI&gt;Edit the dashboard, and change the input type to multi-select. In the multi-select, define the different static values. Save.&lt;/LI&gt;
&lt;LI&gt;Edit the dashboard again, and change the input type to drop down. Save.&lt;/LI&gt;
&lt;LI&gt;Now, when I select one of the values, it gets added to the search with the extra spaces. Wierd!&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 19:35:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268446#M16987</guid>
      <dc:creator>richardAtOmni</dc:creator>
      <dc:date>2017-02-02T19:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268447#M16988</link>
      <description>&lt;P&gt;I came here because this was my issue.  It turns out that Splunk had set a " " option for me.  I deleted this and it works, now.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 10:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/268447#M16988</guid>
      <dc:creator>ntennant</dc:creator>
      <dc:date>2020-03-25T10:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I define my drop-down input properly so that values are entered into my search without the extraneous spaces</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/568097#M46647</link>
      <description>&lt;P&gt;This is INDEED the exact issue.&amp;nbsp; Editing via source and then simply closing/saving fixes the issue of the token adding spaces between each character which is then fed into any subsequent searches utilizing the token, which of course makes it fail.&amp;nbsp; Big thanks to "richardAtOmni"&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 16:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-can-I-define-my-drop-down-input-properly-so-that-values-are/m-p/568097#M46647</guid>
      <dc:creator>cisconate</dc:creator>
      <dc:date>2021-09-22T16:43:21Z</dc:date>
    </item>
  </channel>
</rss>

