<?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 set a multi drop-down value from JavaScript once a dynamic search has populated its options? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-a-multi-drop-down-value-from-JavaScript-once-a/m-p/238521#M70849</link>
    <description>&lt;P&gt;I know this is old post, but I've run into this and had to work out an answer.&lt;/P&gt;

&lt;P&gt;I ended up listening to the on change event for the searchmanager being used by the dropdown, then parse the array (of arrays) returned in its data().rows.  I'm still trying to figure out the setting of selected value via JS, but one thing at a time right.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 14:21:02 GMT</pubDate>
    <dc:creator>csperry_splunk</dc:creator>
    <dc:date>2017-06-23T14:21:02Z</dc:date>
    <item>
      <title>How to set a multi drop-down value from JavaScript once a dynamic search has populated its options?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-a-multi-drop-down-value-from-JavaScript-once-a/m-p/238520#M70848</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a multi drop-down menu that is populated from a search. I want to set the value of the drop-down menu as 'X' when the search has populated 'X' as an option (the search should always return this value).&lt;/P&gt;

&lt;P&gt;So far I can grab the element:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mvc.Components.getInstance('input2')&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;However, I can only see the statically assigned values of the object when I grab this via the developer console in the browser.&lt;/P&gt;

&lt;P&gt;Does anybody know if I can register a handler against this object that listens for change, and if it changes enumerates the options and sets 'X' if found?&lt;/P&gt;

&lt;P&gt;Hope this makes sense.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Ollie&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 16:59:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-a-multi-drop-down-value-from-JavaScript-once-a/m-p/238520#M70848</guid>
      <dc:creator>ollie920049</dc:creator>
      <dc:date>2016-05-04T16:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a multi drop-down value from JavaScript once a dynamic search has populated its options?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-set-a-multi-drop-down-value-from-JavaScript-once-a/m-p/238521#M70849</link>
      <description>&lt;P&gt;I know this is old post, but I've run into this and had to work out an answer.&lt;/P&gt;

&lt;P&gt;I ended up listening to the on change event for the searchmanager being used by the dropdown, then parse the array (of arrays) returned in its data().rows.  I'm still trying to figure out the setting of selected value via JS, but one thing at a time right.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 14:21:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-set-a-multi-drop-down-value-from-JavaScript-once-a/m-p/238521#M70849</guid>
      <dc:creator>csperry_splunk</dc:creator>
      <dc:date>2017-06-23T14:21:02Z</dc:date>
    </item>
  </channel>
</rss>

