<?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 to populate a dynamic drop-down with an eval case statement? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246597#M73514</link>
    <description>&lt;P&gt;Use this as dd2 search&lt;BR /&gt;
&lt;STRONG&gt;Update - fixed typo&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval values=ase ("$dd1$" == "dd1v1", "dd2v1",  "$dd1$" == "dd1v2",  "dd2v2",1=1,"Unknown") | table values
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Aug 2016 16:45:30 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-08-25T16:45:30Z</dc:date>
    <item>
      <title>How to populate a dynamic drop-down with an eval case statement?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246596#M73513</link>
      <description>&lt;P&gt;Hi! &lt;/P&gt;

&lt;P&gt;So I have two drop-downs on my dashboard: one with a static list of options (dd1), and a second one which will populate based on the first choice made (dd2). In dd2, I am using the dynamic search option with the token from dd1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval values = case ( $dd1$ == "dd1v1", "dd2v1",  $dd1$ == "dd1v2",  "dd2v2")
fieldforvalues and fieldforlabels = values
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The message below dd2 says it is "Populating", but then it continues to do so after a while before stating no results were found. &lt;BR /&gt;
Any help, or alternative suggestions to this method would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;Using Splunk Enterprise 6.4 and Simple XML I believe. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 16:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246596#M73513</guid>
      <dc:creator>myungjaeyi</dc:creator>
      <dc:date>2016-08-25T16:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a dynamic drop-down with an eval case statement?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246597#M73514</link>
      <description>&lt;P&gt;Use this as dd2 search&lt;BR /&gt;
&lt;STRONG&gt;Update - fixed typo&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval values=ase ("$dd1$" == "dd1v1", "dd2v1",  "$dd1$" == "dd1v2",  "dd2v2",1=1,"Unknown") | table values
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2016 16:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246597#M73514</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-25T16:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a dynamic drop-down with an eval case statement?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246598#M73515</link>
      <description>&lt;P&gt;Still hitting the same problem. I am pretty new to Splunk, so I'm not sure if this is related, but occasionally, the app will replace $dd1$ with the actual value? Like the search query will change from $dd1$ to dd1v.&lt;/P&gt;

&lt;P&gt;Also thanks for the quick resposne!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 16:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246598#M73515</guid>
      <dc:creator>myungjaeyi</dc:creator>
      <dc:date>2016-08-25T16:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a dynamic drop-down with an eval case statement?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246599#M73516</link>
      <description>&lt;P&gt;So this did the trick but it should be gentimes start = -1&lt;/P&gt;

&lt;P&gt;However, I am still getting the issue where the token, $dd1$, is being replaced with the actual value in the dynamic search for dd2&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 18:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246599#M73516</guid>
      <dc:creator>myungjaeyi</dc:creator>
      <dc:date>2016-08-25T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to populate a dynamic drop-down with an eval case statement?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246600#M73517</link>
      <description>&lt;P&gt;Everything is now working! I also was able to do a list of results which you will need to append &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | makemv values | mvexpand values | table values 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;at the end in order to separate the list into separate values for the field&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 19:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-populate-a-dynamic-drop-down-with-an-eval-case-statement/m-p/246600#M73517</guid>
      <dc:creator>myungjaeyi</dc:creator>
      <dc:date>2016-08-25T19:02:36Z</dc:date>
    </item>
  </channel>
</rss>

