<?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: help on a dropdown list static option for empty field in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467293#M45640</link>
    <description>&lt;P&gt;You can use &lt;STRONG&gt;fillnull&lt;/STRONG&gt; to assign a dummy SITE value (like blank) to the output after the lookup with the toto.csv file.&lt;/P&gt;

&lt;P&gt;And then add a static N/A value to your first filter. So when you select blank in the filter, the search will consider all hosts without SITE.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup host.csv 
| lookup patchlevel.csv "Computer" as host 
| lookup toto.csv HOSTNAME as host output SITE 
| fillnull SITE value="blank"
| search SITE=$tok_filtersite|s$ 
| stats count(flag_patch_version)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Fillnull"&gt; see fillnull documentation here&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2019 12:41:03 GMT</pubDate>
    <dc:creator>KARANMALHOTRA</dc:creator>
    <dc:date>2019-09-03T12:41:03Z</dc:date>
    <item>
      <title>help on a dropdown list static option for empty field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467292#M45639</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
In a dashboard  I use a doropdown list&lt;BR /&gt;
 the dropdown list is updated like this :&lt;BR /&gt;
    | inputlookup toto.csv &lt;BR /&gt;
    | fields SITE&lt;BR /&gt;
    | dedup SITE &lt;BR /&gt;
    | table SITE &lt;BR /&gt;
    | sort +SITE&lt;/P&gt;

&lt;P&gt;Then, I use the search below in order to be able to filter the search results by SITE&lt;BR /&gt;
it works, but I also want to be able to display the hosts from host.csv which have no SITE in toto.csv because sometimes this field is empty&lt;BR /&gt;
what I have to add in the static option to do this please?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup host.csv 
| lookup patchlevel.csv "Computer" as host 
| lookup toto.csv HOSTNAME as host output SITE 
| search SITE=$tok_filtersite|s$ 
| stats count(flag_patch_version)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 08:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467292#M45639</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-03T08:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: help on a dropdown list static option for empty field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467293#M45640</link>
      <description>&lt;P&gt;You can use &lt;STRONG&gt;fillnull&lt;/STRONG&gt; to assign a dummy SITE value (like blank) to the output after the lookup with the toto.csv file.&lt;/P&gt;

&lt;P&gt;And then add a static N/A value to your first filter. So when you select blank in the filter, the search will consider all hosts without SITE.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup host.csv 
| lookup patchlevel.csv "Computer" as host 
| lookup toto.csv HOSTNAME as host output SITE 
| fillnull SITE value="blank"
| search SITE=$tok_filtersite|s$ 
| stats count(flag_patch_version)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Fillnull"&gt; see fillnull documentation here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467293#M45640</guid>
      <dc:creator>KARANMALHOTRA</dc:creator>
      <dc:date>2019-09-03T12:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: help on a dropdown list static option for empty field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467294#M45641</link>
      <description>&lt;P&gt;thanks for your answer&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/help-on-a-dropdown-list-static-option-for-empty-field/m-p/467294#M45641</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2019-09-03T12:56:14Z</dc:date>
    </item>
  </channel>
</rss>

