<?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: Why aren't space characters saved on my dashboard? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207122#M13000</link>
    <description>&lt;P&gt;try in the same way.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2016 18:37:27 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2016-11-03T18:37:27Z</dc:date>
    <item>
      <title>Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207117#M12995</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;
I have a problem which has kind of been mentioned &lt;A href="https://answers.splunk.com/answers/137725/problem-with-space-character-in-simple-xml-for-dashboard.html"&gt;before&lt;/A&gt;, but wasn't sufficiently answered. For example, imagine I want to do multiple lookups in one search, using a multiselect to allow the user to choose which lookups to use. The code for the dashboard looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="lookup_tok" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Geofences&amp;lt;/label&amp;gt;
  &amp;lt;choice value="lookup_a"&amp;gt;A&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="lookup_b"&amp;gt;B&amp;lt;/choice&amp;gt;
  &amp;lt;default&amp;gt;A&amp;lt;/default&amp;gt;
  &amp;lt;valuePrefix&amp;gt;| lookup &amp;lt;/valuePrefix&amp;gt;
  &amp;lt;valueSuffix&amp;gt; inputfield inputfield2 OUTPUTNEW field2&amp;lt;/valueSuffix&amp;gt;
  &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
&amp;lt;/input&amp;gt;
...
&amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;source=geo $lookup_tok$ | table ...&amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is with "valuePrefix" and "valueSuffix". There is a space character at the end of the prefix and the beginning of the suffix. These are obligatory, obviously - if they weren't present, the compiled token would look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookuplookup_ainputfield...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Problem is, Splunk doesn't save that space character using the integrated UI-Editor, only when saving the Simple XML text directly containing a space. If I try to save those values from the UI in the dialog to edit an input, they simply aren't saved; what's worse is that if I add them in Simple XML (which results in the desired behavior) and then use the UI editor to change anything on the dashboard, they are removed (which breaks the dashboard). The problem is probably not the space character itself, I have tried using &lt;CODE&gt;&amp;amp;#32;&lt;/CODE&gt; instead with the exact same results.&lt;BR /&gt;
The same happens if you try to add the space characters in the actual "value"-attribute of the choices like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="geofence_lookup_tok" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Geofences&amp;lt;/label&amp;gt;
  &amp;lt;choice value=" geo_a "&amp;gt;A&amp;lt;/choice&amp;gt;
  &amp;lt;choice value=" geo_b "&amp;gt;B&amp;lt;/choice&amp;gt;
  &amp;lt;default&amp;gt;A&amp;lt;/default&amp;gt;
  &amp;lt;valuePrefix&amp;gt;| lookup&amp;lt;/valuePrefix&amp;gt;
  &amp;lt;valueSuffix&amp;gt;latitude longitude OUTPUTNEW featureId&amp;lt;/valueSuffix&amp;gt;
  &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This also comes into play when you don't want the token to have an effect under certain conditions - e.g. when you have an input to select whether to filter something or not:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="filter_tok" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Filter&amp;lt;/label&amp;gt;
  &amp;lt;choice value="| where foo&amp;gt;0"&amp;gt;Filter foo&amp;lt;/choice&amp;gt;
  &amp;lt;choice value=" "&amp;gt;Don't filter foo&amp;lt;/choice&amp;gt;
...
&amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;source=baz | stats foo $filter_tok$&amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This behavior can also be observed when you explicitly set a token:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;change&amp;gt;
  &amp;lt;condition label="Filter"&amp;gt;
    &amp;lt;set token="some_token"&amp;gt;| where something&amp;lt;/set&amp;gt;
  &amp;lt;/condition&amp;gt;
  &amp;lt;condition label="No Filter"&amp;gt;
    &amp;lt;set token="some_token"&amp;gt; &amp;lt;/set&amp;gt;
  &amp;lt;/condition&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All these space characters will disappear when using the UI to edit the dashboard. Any Ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 12:36:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207117#M12995</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-11-02T12:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207118#M12996</link>
      <description>&lt;P&gt;try this: a space in the value and two spaces in the suffix before inputfield. it worked in a test dashboard.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;input type="multiselect" token="lookup_tok" searchWhenChanged="true"&amp;gt;
    &amp;lt;label&amp;gt;Geofences&amp;lt;/label&amp;gt;
    &amp;lt;choice value=" lookup_a"&amp;gt;A&amp;lt;/choice&amp;gt;
    &amp;lt;choice value=" lookup_b"&amp;gt;B&amp;lt;/choice&amp;gt;
    &amp;lt;default&amp;gt;A&amp;lt;/default&amp;gt;
    &amp;lt;valuePrefix&amp;gt;| lookup&amp;lt;/valuePrefix&amp;gt;
    &amp;lt;valueSuffix&amp;gt;  inputfield inputfield2 OUTPUTNEW field2&amp;lt;/valueSuffix&amp;gt;
    &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
  &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR two spaces after the prefix and two spaces before the suffix&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;input type="multiselect" token="lookup_tok" searchWhenChanged="true"&amp;gt;
    &amp;lt;label&amp;gt;Geofences&amp;lt;/label&amp;gt;
    &amp;lt;choice value="lookup_a"&amp;gt;A&amp;lt;/choice&amp;gt;
    &amp;lt;choice value="lookup_b"&amp;gt;B&amp;lt;/choice&amp;gt;
    &amp;lt;default&amp;gt;A&amp;lt;/default&amp;gt;
    &amp;lt;valuePrefix&amp;gt;| lookup  &amp;lt;/valuePrefix&amp;gt;
    &amp;lt;valueSuffix&amp;gt;  inputfield inputfield2 OUTPUTNEW field2&amp;lt;/valueSuffix&amp;gt;
    &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
  &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my output was &lt;CODE&gt;| lookup lookup_a inputfield inputfield2 OUTPUTNEW field2&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 12:58:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207118#M12996</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-11-02T12:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207119#M12997</link>
      <description>&lt;P&gt;Unfortunately, this results in the same behavior as a single space character. You'll notice that when you a) set those two spaces in Simple XML (you still can't set them in the UI) b) change something on the dashboard in the UI and c) re-open the dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 13:11:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207119#M12997</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-11-02T13:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207120#M12998</link>
      <description>&lt;P&gt;Hi jeffland,&lt;BR /&gt;
use &lt;CODE&gt;| lookup "&lt;/CODE&gt; as prefix and &lt;CODE&gt;" inputfield inputfield2 OUTPUTNEW field2&lt;/CODE&gt; as suffix.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 14:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207120#M12998</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-03T14:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207121#M12999</link>
      <description>&lt;P&gt;Cool, this actually does the trick for case 1 (you can put the name of the lookup in double quotes) - thanks for the suggestion!&lt;BR /&gt;
It still doesn't fix the problems when setting a token explicitly or using a space character for an options value.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 15:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207121#M12999</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-11-03T15:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207122#M13000</link>
      <description>&lt;P&gt;try in the same way.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207122#M13000</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-03T18:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207123#M13001</link>
      <description>&lt;P&gt;We are having a similar issue.  our spaces will save initially, but after some amount of time and/or editing, the spaces around certain characters are removed.&lt;/P&gt;

&lt;P&gt;Most often modified example:&lt;BR /&gt;
We use something similar to "|fields - Field1,Field2" in a dashboard query.  Every so often the spaces are removed making the command not work.  e.g. "|fields-Field1,Field2"&lt;/P&gt;

&lt;P&gt;Would be glad to help troubleshoot if someone has steps.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:58:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207123#M13001</guid>
      <dc:creator>james_hopton</dc:creator>
      <dc:date>2016-11-03T18:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207124#M13002</link>
      <description>&lt;P&gt;That won't work, I can't just add double quotes randomly somewhere in my search. Or maybe I didn't get how you want to do it in the following situation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="dropdown" token="filter_tok" searchWhenChanged="true"&amp;gt;
  &amp;lt;label&amp;gt;Filter&amp;lt;/label&amp;gt;
  &amp;lt;choice value="| where foo&amp;gt;0"&amp;gt;Filter foo&amp;lt;/choice&amp;gt;
  &amp;lt;choice value=" "&amp;gt;Don't filter foo&amp;lt;/choice&amp;gt;
  ...
&amp;lt;search&amp;gt;
  &amp;lt;query&amp;gt;source=baz | stats foo $filter_tok$&amp;lt;/query&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 08:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207124#M13002</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-11-04T08:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207125#M13003</link>
      <description>&lt;P&gt;Hi jeffland,&lt;BR /&gt;
Sorry, I didn't understand the second part of the problem!&lt;BR /&gt;
There isn't a direct solution because it isn't possible to set a null value to a token, you could use a workaround (or better "a porkaround") inserting a condition always true like &lt;CODE&gt;| where 1=1&lt;/CODE&gt; or &lt;CODE&gt;| search index=*&lt;/CODE&gt;.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 14:01:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207125#M13003</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-04T14:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207126#M13004</link>
      <description>&lt;P&gt;Yeah, I've also used &lt;CODE&gt;| noop&lt;/CODE&gt; in the past, but it just doesn't feel right. I was looking for a proper solution, but maybe there is none (yet). Thanks for your input nonetheless!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 10:42:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207126#M13004</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2016-11-07T10:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207127#M13005</link>
      <description>&lt;P&gt;What I've found to work is to use   in place of space for html tags or xml tags. Please accept as answer or award point if this works for you. &lt;/P&gt;

&lt;P&gt;in the case of your token tag, change it to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;set token="some_token"&amp;gt;&amp;amp;#32;&amp;lt;/set&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Apr 2017 14:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207127#M13005</guid>
      <dc:creator>spammenot66</dc:creator>
      <dc:date>2017-04-06T14:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why aren't space characters saved on my dashboard?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207128#M13006</link>
      <description>&lt;P&gt;As I've already said in my question, &lt;CODE&gt;&amp;amp;#32;&lt;/CODE&gt; behaves just like space, so this doesn't work either.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 08:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Why-aren-t-space-characters-saved-on-my-dashboard/m-p/207128#M13006</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2017-04-07T08:30:30Z</dc:date>
    </item>
  </channel>
</rss>

