<?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 How to add a search text field input and index drop-down list to the top of a dashboard in simple XML? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133676#M36506</link>
    <description>&lt;P&gt;How can I easily add a "search bar" to the top of my own dashboards?  Trying to add a quick and convenient way for less advanced splunk users to quickly execute a search without having to know SPL.  I'm expecting 2 inputs.  (1) simple search term(s), like a java class name or portion of an error message, and (2) a drop down to pick between a few indexes.&lt;/P&gt;

&lt;P&gt;I want the search results to open a new browser window and not show up on the current dashboard.  I'm thinking the user clicks on a "Search" button beside text input field and that opens the search view.&lt;/P&gt;

&lt;P&gt;I know how to do this with Advanced XML, but now I'm trying to unlearn all of that. ;-(   I was surprised not to find something like this in the simple_xml_examples app.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:15:14 GMT</pubDate>
    <dc:creator>Lowell</dc:creator>
    <dc:date>2020-09-28T18:15:14Z</dc:date>
    <item>
      <title>How to add a search text field input and index drop-down list to the top of a dashboard in simple XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133676#M36506</link>
      <description>&lt;P&gt;How can I easily add a "search bar" to the top of my own dashboards?  Trying to add a quick and convenient way for less advanced splunk users to quickly execute a search without having to know SPL.  I'm expecting 2 inputs.  (1) simple search term(s), like a java class name or portion of an error message, and (2) a drop down to pick between a few indexes.&lt;/P&gt;

&lt;P&gt;I want the search results to open a new browser window and not show up on the current dashboard.  I'm thinking the user clicks on a "Search" button beside text input field and that opens the search view.&lt;/P&gt;

&lt;P&gt;I know how to do this with Advanced XML, but now I'm trying to unlearn all of that. ;-(   I was surprised not to find something like this in the simple_xml_examples app.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133676#M36506</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2020-09-28T18:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a search text field input and index drop-down list to the top of a dashboard in simple XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133677#M36507</link>
      <description>&lt;P&gt;If you ditch the open-in-new-window part that's super easy in SimpleXML using the graphical dashboard/form editor available since 6.1... if you have to keep that part then build it to open in the dashboard itself, then click the magnifying glass "Open in Search".&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2014 18:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133677#M36507</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-25T18:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a search text field input and index drop-down list to the top of a dashboard in simple XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133678#M36508</link>
      <description>&lt;P&gt;Give this a try (workaround, instead of button , there will be table row that can be clicked)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Custom Search&amp;lt;/label&amp;gt;
  &amp;lt;description/&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="text" token="filters" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Search Filter&amp;lt;/label&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="dropdown" token="index" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Index to Search On&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;populatingSearch fieldForLabel="index" fieldForValue="index"&amp;gt;| eventcount summarize=false index=* | table index&amp;lt;/populatingSearch&amp;gt;
      &amp;lt;default&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 depends="$filters$"&amp;gt;
        &amp;lt;searchString&amp;gt;| gentimes start=-1 | eval Filters=coalesce("$filters$","") | eval SearchString="index=$index$ ".Filters | table SearchString | eval Action="Search"&amp;lt;/searchString&amp;gt;
        &amp;lt;earliestTime&amp;gt;0&amp;lt;/earliestTime&amp;gt;
        &amp;lt;latestTime/&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
        &amp;lt;drilldown target="My New Window"&amp;gt;
       &amp;lt;link&amp;gt;
          /app/YourApp/search?q=$row.SearchString$
        &amp;lt;/link&amp;gt;
      &amp;lt;/drilldown&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;</description>
      <pubDate>Tue, 25 Nov 2014 18:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-add-a-search-text-field-input-and-index-drop-down-list-to/m-p/133678#M36508</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-25T18:17:49Z</dc:date>
    </item>
  </channel>
</rss>

