<?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 Create Dynamic Dropdown Inputs at Search Results within a Form (Version 6.3.3) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221856#M43537</link>
    <description>&lt;P&gt;There are a couple of ways of doing the kind of thing you want. One is simpler and requires more inputs, another is more complex and may not work in all cases but will reduce the number of inputs.&lt;/P&gt;

&lt;P&gt;The first thing to know is how to use the &lt;CODE&gt;depends=&lt;/CODE&gt; and &lt;CODE&gt;rejects=&lt;/CODE&gt; settings on the &lt;CODE&gt;&amp;lt;input&amp;gt;&lt;/CODE&gt; elements. You can hide or show elements of the dashboards using the tokens you are setting by referencing the tokens in the &lt;CODE&gt;depends=&lt;/CODE&gt; and &lt;CODE&gt;rejects=&lt;/CODE&gt; settings. For example, the following dropdown only appears when &lt;CODE&gt;token_A&lt;/CODE&gt; and &lt;CODE&gt;token_B&lt;/CODE&gt; are defined to some value and &lt;CODE&gt;token_C&lt;/CODE&gt; is undefined. More details here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/PanelreferenceforSimplifiedXML"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/PanelreferenceforSimplifiedXML&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input searchWhenChanged="true" token="split_field" type="dropdown" depends="$token_A$,$token_B$" rejects="$token_C$"&amp;gt;
      &amp;lt;label&amp;gt;Split-by Field&amp;lt;/label&amp;gt;
      &amp;lt;choice value="user"&amp;gt;User&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="host"&amp;gt;Host&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="domain"&amp;gt;Domain&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;domain&amp;lt;/default&amp;gt;
&amp;lt;/input
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you should be able to see a way to combine tokens in a logical fashion to determine which ones are used or not. The number of combinations of inputs and what values to show in those inputs will determine how complex this gets. The other thing that will determine how complex is if you want certain values to appear in the second-level inputs based on searches that populate those values. I can't really spell a simple example here, but just be sure you test everything out.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2016 18:30:14 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2016-10-04T18:30:14Z</dc:date>
    <item>
      <title>How to Create Dynamic Dropdown Inputs at Search Results within a Form (Version 6.3.3)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221855#M43536</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I’m looking for a way to add dropdown inputs to the search results of a form.  &lt;/P&gt;

&lt;P&gt;I’m looking for something where the inputs are based on the initial selection from the form (so there are 6 options to choose, and each option displays different field values).  &lt;/P&gt;

&lt;P&gt;Here is a small sample of the current form:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;searchTemplate&amp;gt;
    &amp;lt;![CDATA[ `$tkn_search$` $tkn$ $tkn$ $tkn$ $tkn$ $tkn$ $tkn$ $tkn$
     | `$tkn_transaction_search$`]]&amp;gt;
  &amp;lt;/searchTemplate&amp;gt;
  &amp;lt;fieldset autoRun="false" submitButton="true"&amp;gt;
    &amp;lt;input type="dropdown" searchWhenChanged="false" token="tkn_search"&amp;gt;
      &amp;lt;choice value="search_a"&amp;gt;A&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="search_b"&amp;gt;B&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="search_c"&amp;gt;C&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="search_d"&amp;gt;D&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="search_e"&amp;gt;E&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="search_f"&amp;gt;F&amp;lt;/choice&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;!-- &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/EventHandlerReference#Condition_element" target="test_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/EventHandlerReference#Condition_element&lt;/A&gt; --&amp;gt;
        &amp;lt;condition label="A"&amp;gt;
          &amp;lt;set token="tkn_transaction_search"&amp;gt;txn_a&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="B"&amp;gt;
          &amp;lt;set token="tkn_transaction_search"&amp;gt;txn_b&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="C"&amp;gt;
          &amp;lt;set token="tkn_transaction_search"&amp;gt;txn_c&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="D"&amp;gt;
          &amp;lt;set token="tkn_transaction_search"&amp;gt;txn_d&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="E"&amp;gt;
          &amp;lt;set token="tkn_transaction_search"&amp;gt;txn_e&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition label="F"&amp;gt;
          &amp;lt;set token="tkn_transaction_search"&amp;gt;txn_f&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
&amp;lt;various_inputs&amp;gt; &amp;lt;/various_inputs&amp;gt;
    &amp;lt;input type="time" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;Select time:&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliestTime&amp;gt;@d&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="results"&amp;gt;
        &amp;lt;title&amp;gt;Your Results&amp;lt;/title&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;

&lt;P&gt;Any point of direction within the docs or sample code would be greatly appreciated. &lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 14:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221855#M43536</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2016-10-04T14:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Dynamic Dropdown Inputs at Search Results within a Form (Version 6.3.3)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221856#M43537</link>
      <description>&lt;P&gt;There are a couple of ways of doing the kind of thing you want. One is simpler and requires more inputs, another is more complex and may not work in all cases but will reduce the number of inputs.&lt;/P&gt;

&lt;P&gt;The first thing to know is how to use the &lt;CODE&gt;depends=&lt;/CODE&gt; and &lt;CODE&gt;rejects=&lt;/CODE&gt; settings on the &lt;CODE&gt;&amp;lt;input&amp;gt;&lt;/CODE&gt; elements. You can hide or show elements of the dashboards using the tokens you are setting by referencing the tokens in the &lt;CODE&gt;depends=&lt;/CODE&gt; and &lt;CODE&gt;rejects=&lt;/CODE&gt; settings. For example, the following dropdown only appears when &lt;CODE&gt;token_A&lt;/CODE&gt; and &lt;CODE&gt;token_B&lt;/CODE&gt; are defined to some value and &lt;CODE&gt;token_C&lt;/CODE&gt; is undefined. More details here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/PanelreferenceforSimplifiedXML"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/PanelreferenceforSimplifiedXML&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input searchWhenChanged="true" token="split_field" type="dropdown" depends="$token_A$,$token_B$" rejects="$token_C$"&amp;gt;
      &amp;lt;label&amp;gt;Split-by Field&amp;lt;/label&amp;gt;
      &amp;lt;choice value="user"&amp;gt;User&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="host"&amp;gt;Host&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="domain"&amp;gt;Domain&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;domain&amp;lt;/default&amp;gt;
&amp;lt;/input
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you should be able to see a way to combine tokens in a logical fashion to determine which ones are used or not. The number of combinations of inputs and what values to show in those inputs will determine how complex this gets. The other thing that will determine how complex is if you want certain values to appear in the second-level inputs based on searches that populate those values. I can't really spell a simple example here, but just be sure you test everything out.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 18:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221856#M43537</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-10-04T18:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Dynamic Dropdown Inputs at Search Results within a Form (Version 6.3.3)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221857#M43538</link>
      <description>&lt;P&gt;rjthibod,&lt;/P&gt;

&lt;P&gt;Interesting!  I'll play around with this and let you know how it goes.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 19:16:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221857#M43538</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2016-10-04T19:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to Create Dynamic Dropdown Inputs at Search Results within a Form (Version 6.3.3)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221858#M43539</link>
      <description>&lt;P&gt;Also @KolGr001, if still stuck by the time we do office hours again, we can work through this. In the interim, please check out the latest docs as you might notice that some of the simple xml tags you were using have been superseded by newer versions that are easier to use. If you end up nailing this then go ahead and accept @rjthibod's answer?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 14:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Create-Dynamic-Dropdown-Inputs-at-Search-Results-within-a/m-p/221858#M43539</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2016-10-05T14:53:05Z</dc:date>
    </item>
  </channel>
</rss>

