<?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 have multiple populating searches in a single drop down menu? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291632#M18516</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;label&amp;gt;Select SPACE:&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;WHOLE&amp;lt;/default&amp;gt;
  &amp;lt;choice value="*"&amp;gt;All SPACE&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="tech"&amp;gt;TECH &amp;lt;/choice&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;spaceName&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;SPACE&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt; main search        | table SPACE spaceName&amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition value="WHOLE"&amp;gt;
      &amp;lt;set token="TC_SPACE_FLAG"&amp;gt;Y&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
    &amp;lt;condition&amp;gt;
      &amp;lt;unset token="TC_SPACE_FLAG"&amp;gt;&amp;lt;/unset&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
  &amp;lt;suffix&amp;gt;*&amp;lt;/suffix&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="dropdown" token="MORE_SPACE" searchWhenChanged="true" depends="$HideIt$"&amp;gt;
  &amp;lt;label&amp;gt;MORE_SPACE&amp;lt;/label&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;TS&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;TS&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;selectFirstChoice&amp;gt;true&amp;lt;/selectFirstChoice&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt; main query to get TS&amp;lt;/query&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;set token="Space"&amp;gt;$result.TS$&amp;lt;/set&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So basically we are creating another drop down which we are hiding. So as soon as the corresponding drop down item is selected, all the items in the hidden drop down are invoked.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2018 19:26:46 GMT</pubDate>
    <dc:creator>macadminrohit</dc:creator>
    <dc:date>2018-02-27T19:26:46Z</dc:date>
    <item>
      <title>Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291624#M18508</link>
      <description>&lt;P&gt;Is it possible to have multiple populating searches in a single drop down menu?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;label&amp;gt;Select a CITY&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
  &amp;lt;choice value="*"&amp;gt;All Cities&amp;lt;/choice&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;CityName&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;CITY&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;search base="lookup_csv"&amp;gt;
    &amp;lt;query&amp;gt;search OPEN="Y" AND EXIST ="Y" | search TimeZone=$TimeZone$ AND Territory=$Territory$ AND Region=$Region$ AND District=$District$ AND STATE=$State$  
    | sort CITY
    | eval CityName = CITY+"-"+CITY_NAME+"-"+STATE 
    | table CITY CityName&amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The base search gets me the City names from a lookup file. What i need now is to another option in the same drop down menu named as "&lt;STRONG&gt;Special Cities&lt;/STRONG&gt;" which will populate the values from a different lookup file which i can define here. And when that option is selected by the user, the subsequent searches should use those values to search for the events.&lt;/P&gt;

&lt;P&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 00:45:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291624#M18508</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-20T00:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291625#M18509</link>
      <description>&lt;P&gt;@macadminrohit, You can use append to add the results from second search to your current search. Make sure fields returned are same i.e. CITY, CITY_NAME and STATE.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Append#Examples"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Append#Examples&lt;/A&gt;&lt;BR /&gt;
Without the actual fields in the second lookup &lt;CODE&gt;special cities&lt;/CODE&gt; and lookup/lookup file name it will be tough assist you with exact query.&lt;/P&gt;

&lt;P&gt;Also, your current search shows filter in base search as well as after first pipe. Make sure all your filters are in your base search if possible.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 02:50:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291625#M18509</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-02-20T02:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291626#M18510</link>
      <description>&lt;P&gt;Thanks Niket, There will be only one field name in the second lookup ( special cities) , which is just numbers &lt;BR /&gt;
001, 002, 003 etc and the lookup name will be special_cities.csv&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 03:45:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291626#M18510</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-20T03:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291627#M18511</link>
      <description>&lt;P&gt;And there are other searches in this dashboard which are using this base search so i cant really modify it.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 03:47:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291627#M18511</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-20T03:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291628#M18512</link>
      <description>&lt;P&gt;Ok so let me clarify the intent. Do you want to have static option "Special Cities" in Dropdown and when that is selected pass the special city codes from lookup to search? Is this correct?&lt;/P&gt;

&lt;P&gt;What is the search you want to run is there a field corresponding to Special City codes in your indexed data?&lt;/P&gt;

&lt;P&gt;I saw that you are using a base search to populate results in the dropdown but does not seem like this search is used for recursive post processing so it can be modified. However, based on answer to my previous question change to search might not be required.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 04:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291628#M18512</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-02-20T04:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291629#M18513</link>
      <description>&lt;P&gt;Yes the Special cities field values will be coming from another lookup which has just the list of special cities. So once that option is selected, we need all events related to those special cities field values.&lt;/P&gt;

&lt;P&gt;Drop down will look something like this :&lt;/P&gt;

&lt;P&gt;Select a City:&lt;BR /&gt;
ALL CITIES&lt;BR /&gt;
Special Cities&lt;BR /&gt;
City1&lt;BR /&gt;
City2&lt;BR /&gt;
City3&lt;/P&gt;

&lt;P&gt;So when the user selects ALL CITIES, by default a * is used as a field value in other searches. When Special Cities is selected, it should recursively take all values from the lookup and use in other searches.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 15:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291629#M18513</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-20T15:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291630#M18514</link>
      <description>&lt;P&gt;We were able to do this, by adding some logic to the dashboard.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 20:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291630#M18514</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-22T20:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291631#M18515</link>
      <description>&lt;P&gt;@macadminrohit, good to know that you were able to resolve this. I would request you to add the approach taken to resolve the issue and Accept the same to mark this question as answered!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2018 05:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291631#M18515</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-02-24T05:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291632#M18516</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;label&amp;gt;Select SPACE:&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;WHOLE&amp;lt;/default&amp;gt;
  &amp;lt;choice value="*"&amp;gt;All SPACE&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="tech"&amp;gt;TECH &amp;lt;/choice&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;spaceName&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;SPACE&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt; main search        | table SPACE spaceName&amp;lt;/query&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition value="WHOLE"&amp;gt;
      &amp;lt;set token="TC_SPACE_FLAG"&amp;gt;Y&amp;lt;/set&amp;gt;
    &amp;lt;/condition&amp;gt;
    &amp;lt;condition&amp;gt;
      &amp;lt;unset token="TC_SPACE_FLAG"&amp;gt;&amp;lt;/unset&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
  &amp;lt;suffix&amp;gt;*&amp;lt;/suffix&amp;gt;
&amp;lt;/input&amp;gt;
&amp;lt;input type="dropdown" token="MORE_SPACE" searchWhenChanged="true" depends="$HideIt$"&amp;gt;
  &amp;lt;label&amp;gt;MORE_SPACE&amp;lt;/label&amp;gt;
  &amp;lt;fieldForLabel&amp;gt;TS&amp;lt;/fieldForLabel&amp;gt;
  &amp;lt;fieldForValue&amp;gt;TS&amp;lt;/fieldForValue&amp;gt;
  &amp;lt;selectFirstChoice&amp;gt;true&amp;lt;/selectFirstChoice&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt; main query to get TS&amp;lt;/query&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;set token="Space"&amp;gt;$result.TS$&amp;lt;/set&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So basically we are creating another drop down which we are hiding. So as soon as the corresponding drop down item is selected, all the items in the hidden drop down are invoked.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 19:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291632#M18516</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-02-27T19:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to have multiple populating searches in a single drop down menu?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291633#M18517</link>
      <description>&lt;P&gt;@macadminrohit, I have converted your comment to Answer. Please accept the same to mark this as answered.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 20:01:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-have-multiple-populating-searches-in-a-single/m-p/291633#M18517</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-02-27T20:01:54Z</dc:date>
    </item>
  </channel>
</rss>

