<?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: In Simple XML, have * as default text input value is causing incorrect results. in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/In-Simple-XML-have-as-default-text-input-value-is-causing/m-p/280008#M17753</link>
    <description>&lt;P&gt;Hi @lyndac,&lt;BR /&gt;
Take a look at this previous Answers post:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/4911/evaluating-form-field-if-not-null.html"&gt;https://answers.splunk.com/answers/4911/evaluating-form-field-if-not-null.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It discusses using a prefix and suffix around the field to handle cases where users do not input a value. See also this documentation, which includes details for prefix and suffix:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/Viz/PanelreferenceforSimplifiedXML#form"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/Viz/PanelreferenceforSimplifiedXML#form&lt;/A&gt;&lt;BR /&gt;
Hope this helps!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Feb 2016 00:45:28 GMT</pubDate>
    <dc:creator>frobinson_splun</dc:creator>
    <dc:date>2016-02-12T00:45:28Z</dc:date>
    <item>
      <title>In Simple XML, have * as default text input value is causing incorrect results.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/In-Simple-XML-have-as-default-text-input-value-is-causing/m-p/280007#M17752</link>
      <description>&lt;P&gt;I am using splunk 6.3.1.  My data is indexed as JSON.  Not all fields will have a value. For example, 2 (very simplified events) could look like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
  "host":"hostname",
  "field2":"pickle",
  "field3":  "onion"
}
{
  "host": "host2",
  "field2": "pickachu"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a dashboard form (simple xml) that allows the user to use text fields to filter their results.  Currently I have the default value for each of the text fields set to an asterick .  If the user only enters a value for host, and field 2, the token for field3 gets set to *&lt;/P&gt;

&lt;P&gt;index=foo host="hostofmine" field2="pic*" field3="*" | stats count by host&lt;/P&gt;

&lt;P&gt;Since field 3 is an optional field (it may or may not be in the raw json document), having a default value of * causes my search to return incomplete results. For the simple data above, only 1 event will be returned, but I would like both events to return.  I tried just removing the default value, but the search doesn't execute unless I type something into the text field.&lt;/P&gt;

&lt;P&gt;How can I make it so that the user does not have to enter a value into all 3 text fields and only the fields where the user does enter a value are part of the search?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:44:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/In-Simple-XML-have-as-default-text-input-value-is-causing/m-p/280007#M17752</guid>
      <dc:creator>lyndac</dc:creator>
      <dc:date>2020-09-29T08:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: In Simple XML, have * as default text input value is causing incorrect results.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/In-Simple-XML-have-as-default-text-input-value-is-causing/m-p/280008#M17753</link>
      <description>&lt;P&gt;Hi @lyndac,&lt;BR /&gt;
Take a look at this previous Answers post:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/4911/evaluating-form-field-if-not-null.html"&gt;https://answers.splunk.com/answers/4911/evaluating-form-field-if-not-null.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It discusses using a prefix and suffix around the field to handle cases where users do not input a value. See also this documentation, which includes details for prefix and suffix:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/Viz/PanelreferenceforSimplifiedXML#form"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/Viz/PanelreferenceforSimplifiedXML#form&lt;/A&gt;&lt;BR /&gt;
Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2016 00:45:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/In-Simple-XML-have-as-default-text-input-value-is-causing/m-p/280008#M17753</guid>
      <dc:creator>frobinson_splun</dc:creator>
      <dc:date>2016-02-12T00:45:28Z</dc:date>
    </item>
  </channel>
</rss>

