<?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 How do you add a static drop-down for specific field values with conditonal? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497785#M138651</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;System OS 
ABC Windows-Server-2016
ABC Windows-10-Enterprise
ABC Mac-OSX
DEF Windows Server-2016
DEF Windows Server-2012
DEF Red Hat v8.2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above is a little generic data that is in a CSV/lookup, there is a "System" and "OS" field. I have one drop-down that filters by a system that works by dynamically populating. I want to add another drop-down that is static, that filters by server/non-server:&lt;/P&gt;

&lt;P&gt;Windows-10-Enterprise, OSX, etc would be "Non-Server"&lt;BR /&gt;
Red Hat v8.2, WIndows Server-2012, Windows Server-2016, etc would be "Server".&lt;BR /&gt;
* would be for all OS&lt;/P&gt;

&lt;P&gt;I tried adding these as static options, but I can't seem to get it to work.  Only "*" works for an all option. &lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8897i264A7962FA6A4A24/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 18:48:34 GMT</pubDate>
    <dc:creator>UMDTERPS</dc:creator>
    <dc:date>2020-05-15T18:48:34Z</dc:date>
    <item>
      <title>How do you add a static drop-down for specific field values with conditonal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497785#M138651</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;System OS 
ABC Windows-Server-2016
ABC Windows-10-Enterprise
ABC Mac-OSX
DEF Windows Server-2016
DEF Windows Server-2012
DEF Red Hat v8.2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above is a little generic data that is in a CSV/lookup, there is a "System" and "OS" field. I have one drop-down that filters by a system that works by dynamically populating. I want to add another drop-down that is static, that filters by server/non-server:&lt;/P&gt;

&lt;P&gt;Windows-10-Enterprise, OSX, etc would be "Non-Server"&lt;BR /&gt;
Red Hat v8.2, WIndows Server-2012, Windows Server-2016, etc would be "Server".&lt;BR /&gt;
* would be for all OS&lt;/P&gt;

&lt;P&gt;I tried adding these as static options, but I can't seem to get it to work.  Only "*" works for an all option. &lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8897i264A7962FA6A4A24/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 18:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497785#M138651</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-05-15T18:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you add a static drop-down for specific field values with conditonal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497786#M138652</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
   &amp;lt;label&amp;gt;multi select&amp;lt;/label&amp;gt;
   &amp;lt;search id="base"&amp;gt;
     &amp;lt;query&amp;gt;| makeresults
| eval _raw="System,OS
ABC,Windows-Server-2016
ABC,Windows-10-Enterprise
ABC,Mac-OSX
DEF,Windows Server-2016
DEF,Windows Server-2012
DEF,RedHat v8.2"
| multikv forceheader=1
| table System OS
| eval SERVER=if(match(OS,"(?i)server|redhat"),"Server","non-Server")&amp;lt;/query&amp;gt;
     &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
     &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
   &amp;lt;/search&amp;gt;
      &amp;lt;fieldset submitButton="false"&amp;gt;
        &amp;lt;input type="dropdown" token="system"&amp;gt;
       &amp;lt;label&amp;gt;System&amp;lt;/label&amp;gt;
       &amp;lt;fieldForLabel&amp;gt;System&amp;lt;/fieldForLabel&amp;gt;
       &amp;lt;fieldForValue&amp;gt;System&amp;lt;/fieldForValue&amp;gt;
       &amp;lt;search base="base"&amp;gt;
         &amp;lt;query&amp;gt;
 | dedup System&amp;lt;/query&amp;gt;
       &amp;lt;/search&amp;gt;
     &amp;lt;/input&amp;gt;
     &amp;lt;input type="dropdown" token="server"&amp;gt;
       &amp;lt;label&amp;gt;server&amp;lt;/label&amp;gt;
       &amp;lt;fieldForLabel&amp;gt;SERVER&amp;lt;/fieldForLabel&amp;gt;
       &amp;lt;fieldForValue&amp;gt;SERVER&amp;lt;/fieldForValue&amp;gt;
       &amp;lt;search base="base"&amp;gt;
         &amp;lt;query&amp;gt;| dedup SERVER&amp;lt;/query&amp;gt;
       &amp;lt;/search&amp;gt;
     &amp;lt;/input&amp;gt;

   &amp;lt;/fieldset&amp;gt;
   &amp;lt;row&amp;gt;
     &amp;lt;html&amp;gt;
       &amp;lt;p&amp;gt;result:&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;System token:$system$ &amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;SERVER token:$server$&amp;lt;/p&amp;gt;
     &amp;lt;/html&amp;gt;
   &amp;lt;/row&amp;gt;
   &amp;lt;row&amp;gt;
     &amp;lt;panel&amp;gt;
       &amp;lt;table&amp;gt;
         &amp;lt;search base="base"&amp;gt;
           &amp;lt;query&amp;gt;| search System=$system$ AND SERVER=$server$&amp;lt;/query&amp;gt;
         &amp;lt;/search&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;</description>
      <pubDate>Sat, 16 May 2020 02:32:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497786#M138652</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-16T02:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do you add a static drop-down for specific field values with conditonal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497787#M138653</link>
      <description>&lt;P&gt;Thanks for the reply, I'm trying to get two drop downs.  One with a system name drop-down and another drop-down with "Server" and "Non-Server" as options to select. I want the system drop-down to populate the systems and the other drop-down to have "Server" and  "Non-Server" options to select. So essentially, I want to combine your first two drop-downs into one. I attached a pic to show what I would like to do.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8896iB3FB894F12B108D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 16:44:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497787#M138653</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-05-19T16:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do you add a static drop-down for specific field values with conditonal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497788#M138654</link>
      <description>&lt;P&gt;I can't see your latest pic. how about updated my answer?&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 19:36:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497788#M138654</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-19T19:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you add a static drop-down for specific field values with conditonal?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497789#M138655</link>
      <description>&lt;P&gt;I made a slight mod to the SPL/XML, but it works! THANKS! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
    &amp;lt;label&amp;gt;Dropdown Test 2&amp;lt;/label&amp;gt;
    &amp;lt;search id="base"&amp;gt;
      &amp;lt;query&amp;gt;| inputlookup system.csv
 | multikv forceheader=1
 | table System OS
| eval SERVER=if(match(OS,"(?i)server|Red Hat"),"Server","non-Server")&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
    &amp;lt;/search&amp;gt;
       &amp;lt;fieldset submitButton="false"&amp;gt;
         &amp;lt;input type="dropdown" token="system"&amp;gt;
        &amp;lt;label&amp;gt;System&amp;lt;/label&amp;gt;
        &amp;lt;fieldForLabel&amp;gt;System&amp;lt;/fieldForLabel&amp;gt;
        &amp;lt;fieldForValue&amp;gt;System&amp;lt;/fieldForValue&amp;gt;
        &amp;lt;search base="base"&amp;gt;
          &amp;lt;query&amp;gt;
  | dedup System&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="dropdown" token="server"&amp;gt;
        &amp;lt;label&amp;gt;server&amp;lt;/label&amp;gt;
        &amp;lt;fieldForLabel&amp;gt;SERVER&amp;lt;/fieldForLabel&amp;gt;
        &amp;lt;fieldForValue&amp;gt;SERVER&amp;lt;/fieldForValue&amp;gt;
        &amp;lt;search base="base"&amp;gt;
          &amp;lt;query&amp;gt;| dedup SERVER&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/input&amp;gt;

    &amp;lt;/fieldset&amp;gt;
    &amp;lt;row&amp;gt;
      &amp;lt;html&amp;gt;
        &amp;lt;p&amp;gt;result:&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;System token:$system$ &amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;SERVER token:$server$&amp;lt;/p&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/row&amp;gt;
    &amp;lt;row&amp;gt;
      &amp;lt;panel&amp;gt;
        &amp;lt;table&amp;gt;
          &amp;lt;search base="base"&amp;gt;
            &amp;lt;query&amp;gt;| search System=$system$ AND SERVER=$server$&amp;lt;/query&amp;gt;
          &amp;lt;/search&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;</description>
      <pubDate>Wed, 20 May 2020 18:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-add-a-static-drop-down-for-specific-field-values-with/m-p/497789#M138655</guid>
      <dc:creator>UMDTERPS</dc:creator>
      <dc:date>2020-05-20T18:02:14Z</dc:date>
    </item>
  </channel>
</rss>

