<?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 Dependent dropdown auto population in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Dependent-dropdown-auto-population/m-p/521547#M9328</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am new to Splunk and JavaScript as well.&lt;/P&gt;&lt;P&gt;I need help to auto-populate the dropdown list value based on other dropdown values selected.&lt;/P&gt;&lt;P&gt;consider, I have 3 fields Country, State, City which are interdependent on each other.&lt;/P&gt;&lt;P&gt;I am able to populate a dynamic dropdown list(for 2 fields like State &amp;amp; City) on the selection of another dropdown (Country).&lt;/P&gt;&lt;P&gt;Now I want to auto-populate values of State and Country on the selection of any City. Values should be directly displayed in the drop-down box. there should not be a need to select it from the dropdown. As for City, State &amp;amp; Country is going to be unique values.&lt;/P&gt;&lt;P&gt;Thanks in Advance!!!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Sep 2020 19:04:07 GMT</pubDate>
    <dc:creator>ND</dc:creator>
    <dc:date>2020-09-25T19:04:07Z</dc:date>
    <item>
      <title>Dependent dropdown auto population</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dependent-dropdown-auto-population/m-p/521547#M9328</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am new to Splunk and JavaScript as well.&lt;/P&gt;&lt;P&gt;I need help to auto-populate the dropdown list value based on other dropdown values selected.&lt;/P&gt;&lt;P&gt;consider, I have 3 fields Country, State, City which are interdependent on each other.&lt;/P&gt;&lt;P&gt;I am able to populate a dynamic dropdown list(for 2 fields like State &amp;amp; City) on the selection of another dropdown (Country).&lt;/P&gt;&lt;P&gt;Now I want to auto-populate values of State and Country on the selection of any City. Values should be directly displayed in the drop-down box. there should not be a need to select it from the dropdown. As for City, State &amp;amp; Country is going to be unique values.&lt;/P&gt;&lt;P&gt;Thanks in Advance!!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 19:04:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dependent-dropdown-auto-population/m-p/521547#M9328</guid>
      <dc:creator>ND</dc:creator>
      <dc:date>2020-09-25T19:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dependent dropdown auto population</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Dependent-dropdown-auto-population/m-p/521577#M9329</link>
      <description>&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;multi dynamic select&amp;lt;/label&amp;gt;
  &amp;lt;search id="base_csv"&amp;gt;
    &amp;lt;query&amp;gt;| inputlookup geo_attr_us_states.csv
| rex field=state_name "(?&amp;amp;lt;Capital&amp;amp;gt;\w)"
&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="field1"&amp;gt;
      &amp;lt;label&amp;gt;field1&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;Capital_string&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;Capital&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search base="base_csv"&amp;gt;
        &amp;lt;query&amp;gt;| stats values(Capital) as Capital |mvexpand Capital | eval Capital_string=Capital&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="field2"&amp;gt;
      &amp;lt;label&amp;gt;field2&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;state_code_name&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;state_code&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;search base="base_csv"&amp;gt;
        &amp;lt;query&amp;gt;| search Capital="$field1$"
| table state_code
| eval state_code_name=state_code&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;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search base="base_csv"&amp;gt;
          &amp;lt;query&amp;gt;| search state_code="$field2$"&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;/LI-CODE&gt;&lt;P&gt;this is sample code.&lt;BR /&gt;You can do something like this without using javascript.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Sep 2020 01:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Dependent-dropdown-auto-population/m-p/521577#M9329</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-09-26T01:40:22Z</dc:date>
    </item>
  </channel>
</rss>

