<?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: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264317#M50719</link>
    <description>&lt;P&gt;Yes, the file would have to have the same name. However you can directly update a lookup using the REST API. Here is an "Splunk&amp;gt;answers" that might help you along the way: &lt;A href="https://answers.splunk.com/answers/374065/how-to-update-a-global-lookup-file-via-rest-api-fo.html"&gt;https://answers.splunk.com/answers/374065/how-to-update-a-global-lookup-file-via-rest-api-fo.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It is possible to hide/show a graph based on a token value. This can quite easily be done with Simple XML. Take a look at this "Splunk&amp;gt;answers" to get a working example:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/218623/how-to-hide-panels-with-no-results-from-a-dashboar.html"&gt;Hide panels from dashboard&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jul 2016 13:19:46 GMT</pubDate>
    <dc:creator>tormodbp</dc:creator>
    <dc:date>2016-07-19T13:19:46Z</dc:date>
    <item>
      <title>Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264314#M50716</link>
      <description>&lt;P&gt;I am wondering if the following is possible, and if so, how.&lt;/P&gt;

&lt;P&gt;Currently I have a custom drop down-menu in a dashboard with a token for the options that are hard coded in XML. &lt;/P&gt;

&lt;P&gt;Is it possible to create a custom JS script that, that based on a daily ingested CSV file, would add and/or remove options in this drop-down and add/or remove some charts?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 18:46:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264314#M50716</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-18T18:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264315#M50717</link>
      <description>&lt;P&gt;I am sure you could use javascript to accomplish this, but I would like to propose an alternative approach using Splunks integrated features(why re-invent the wheel, right?).&lt;/P&gt;

&lt;P&gt;For automatically updating dropdown options I would recommend using "Dynamic Options" integrated in Splunk's dropdown menus. Here you could specify a search to get your newest ingested CSV-files data. Lets say you import it around midnight every 24h, a "Last 24hour" search window would probably suffice.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Dynamic Options - Search string to populate the dropdown options"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1597iEDB2EBD368C5F920/image-size/large?v=v2&amp;amp;px=999" role="button" title="Dynamic Options - Search string to populate the dropdown options" alt="Dynamic Options - Search string to populate the dropdown options" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The dynamic options could then again be used to feed data to your charts(using tokens), thus effectively making you able to change your graphs on the fly - all without javascript.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 07:34:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264315#M50717</guid>
      <dc:creator>tormodbp</dc:creator>
      <dc:date>2016-07-19T07:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264316#M50718</link>
      <description>&lt;P&gt;Thank you for the information, very helpful! I have two follow up questions now. The ingested VSC file would always have to have the same name in order for the dynamic string to be able to search with that standard name in the search, correct? Furthermore, depending on these dynamic items in the drop down, could a graph in the dashboard be added/removed to demonstrate a metric for each of the drop down items (with or without JS)?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 13:09:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264316#M50718</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-19T13:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264317#M50719</link>
      <description>&lt;P&gt;Yes, the file would have to have the same name. However you can directly update a lookup using the REST API. Here is an "Splunk&amp;gt;answers" that might help you along the way: &lt;A href="https://answers.splunk.com/answers/374065/how-to-update-a-global-lookup-file-via-rest-api-fo.html"&gt;https://answers.splunk.com/answers/374065/how-to-update-a-global-lookup-file-via-rest-api-fo.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It is possible to hide/show a graph based on a token value. This can quite easily be done with Simple XML. Take a look at this "Splunk&amp;gt;answers" to get a working example:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/218623/how-to-hide-panels-with-no-results-from-a-dashboar.html"&gt;Hide panels from dashboard&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 13:19:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264317#M50719</guid>
      <dc:creator>tormodbp</dc:creator>
      <dc:date>2016-07-19T13:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264318#M50720</link>
      <description>&lt;P&gt;Wonderful! So for existing panels, they can be hidden if no value is available. But can they be created is the value in the drop down is new, or the new option would need to be added manually via XML? I am wondering how much manual upkeep this dash board would need, versus full automation. &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 13:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264318#M50720</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-19T13:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264319#M50721</link>
      <description>&lt;P&gt;It depends on what you put in to the term "created".&lt;/P&gt;

&lt;P&gt;If you have a base query and the dynamic dropdown menu should change some parameters in the query, then yes. You can use tokens from the dropdown menu in the search, thus creating/updating a "specialised" result/chart for each selected entry in the dropdown menu. This would be like a "dynamic panel" based on the input from the dropdown menu.&lt;/P&gt;

&lt;P&gt;If you expect a totally new base query per dropdown option you would need some way of specififying it, thus making things a little more complicated.&lt;/P&gt;

&lt;P&gt;There might be a way of doing the latter without creating code to create new code, but that is out of my reach for the moment.&lt;/P&gt;

&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 14:13:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264319#M50721</guid>
      <dc:creator>tormodbp</dc:creator>
      <dc:date>2016-07-19T14:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to automatically update drop-down options with custom JavaScript based on an ingested CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264320#M50722</link>
      <description>&lt;P&gt;Thank you for your time!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 15:00:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-it-possible-to-automatically-update-drop-down-options-with/m-p/264320#M50722</guid>
      <dc:creator>test365498</dc:creator>
      <dc:date>2016-07-19T15:00:21Z</dc:date>
    </item>
  </channel>
</rss>

