<?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 Combine options in a dropdown menu in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343379#M22333</link>
    <description>&lt;P&gt;A year or so ago I changed the way that I label cameras in my spreadsheet that I put into splunk. Ex. instead of PSP I am calling it 9845PSP. Is there something in the dropdown search string that I can add so that PSP and 9845PSP combine into one? It is hard because the format of the cameras is all different. Like one of the cameras we used to call LP2 and now we call it LP2CT1. I would prefer not to go back to my many years of data and change all the names. So far I have this as the search string: &lt;CODE&gt;sourcetype="csv" State="$state$"|stats count by Camera|fields - count&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I have very little experience with splunk and help would be greatly appreciated!!&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2017 13:07:09 GMT</pubDate>
    <dc:creator>sarahw3</dc:creator>
    <dc:date>2017-07-31T13:07:09Z</dc:date>
    <item>
      <title>Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343379#M22333</link>
      <description>&lt;P&gt;A year or so ago I changed the way that I label cameras in my spreadsheet that I put into splunk. Ex. instead of PSP I am calling it 9845PSP. Is there something in the dropdown search string that I can add so that PSP and 9845PSP combine into one? It is hard because the format of the cameras is all different. Like one of the cameras we used to call LP2 and now we call it LP2CT1. I would prefer not to go back to my many years of data and change all the names. So far I have this as the search string: &lt;CODE&gt;sourcetype="csv" State="$state$"|stats count by Camera|fields - count&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I have very little experience with splunk and help would be greatly appreciated!!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343379#M22333</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T13:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343380#M22334</link>
      <description>&lt;P&gt;May be you can change dropdown to multiselect or text field. &lt;/P&gt;

&lt;P&gt;&amp;lt;input type="multiselect" token="camera_tok" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;
      &amp;lt;label&amp;gt; Select a Camera &amp;lt;/label&amp;gt;&lt;BR /&gt;
      &amp;lt;choice value="&lt;EM&gt;"&amp;gt; ALL  &amp;lt;/choice&amp;gt;&lt;BR /&gt;
      &amp;lt;search&amp;gt;&lt;BR /&gt;
        &amp;lt;query&amp;gt;sourcetype=csv Stata=$state$ Camera=&lt;/EM&gt; | stats count by Camera| fields - count&amp;lt;/query&amp;gt;&lt;BR /&gt;&lt;BR /&gt;
      &amp;lt;/search&amp;gt;&lt;BR /&gt;
      &amp;lt;fieldForLabel&amp;gt;Camera&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;
      &amp;lt;fieldForValue&amp;gt;Camera&amp;gt;/fieldForValue&amp;gt;&lt;BR /&gt;
      &amp;lt;prefix/&amp;gt;&lt;BR /&gt;
      &amp;lt;valuePrefix&amp;gt;Camera="&amp;gt;/valuePrefix&amp;gt;&lt;BR /&gt;
      &amp;lt;valueSuffix&amp;gt;*"&amp;gt;/valueSuffix&amp;gt;&lt;BR /&gt;
      &amp;lt;delimiter&amp;gt; OR &amp;gt;/delimiter&amp;gt;&lt;BR /&gt;
      &amp;lt;suffix/&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343380#M22334</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-07-31T13:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343381#M22335</link>
      <description>&lt;P&gt;Brilliant!! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343381#M22335</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T14:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343382#M22336</link>
      <description>&lt;P&gt;Now it is not working with my panels. In my pannel I have &lt;CODE&gt;Camera="$Camera$"&lt;/CODE&gt;. Is there a way I can change that so it will use both the cameras I select?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:15:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343382#M22336</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T14:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343383#M22337</link>
      <description>&lt;P&gt;I'd probably create a lookup table &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Camera     CameraGroup
PSP        PSP
9845PSP    PSP
LP2        LP2CT1
LP2CT1     LP2CT1     
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then have your dropdown box select the group name rather than the camera name. You could, as I have above, call the group  either the same thing as you call the original or current cameras, or you could give them a different name entirely, your choice.  The cool thing is, since that name/value is not in the data at all, you can change it any time you feel like it. This week, it's "PSP funky purple monkey"...  &lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;I'm gathering that you want to provide a dropdownlist of only those Cameras that were used in any given $state$ - not sure whether that might mean "Nevada" or "high resolution".  Here's that code...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="csv" State="$state$" 
| stats by Camera 
| lookup cameragroup Camera OUTPUT CameraGroup 
| stats by CameraGroup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that you don't have to use "count" and delete it, &lt;CODE&gt;stats&lt;/CODE&gt; allows you to just leave it out.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Once the user has selected the state, then the CameraGroup, somewhere in your real search, you'll do a lookup to your cameragroup table and eliminate unmatched records.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="csv" State="$state$" 
... possibly some other stuff ...
| lookup cameragroup Camera OUTPUT CameraGroup
| where CameraGroup = $CameraGroupToken$
| whatever the rest of your current search is
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;There are other, more efficient ways to set up the search code, but it's unlikely that the size of a human-created spreadsheet will have enough data that it matters.&lt;/P&gt;

&lt;P&gt;That would look something like... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="csv" State="$state$" [|inputlookup  cameragroup  | where CameraGroup = "$mytoken$" | table Camera ]
... possibly some other stuff ...
| lookup cameragroup Camera OUTPUT CameraGroup
| whatever the rest of your current search is
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343383#M22337</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-31T14:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343384#M22338</link>
      <description>&lt;P&gt;try this below,&lt;/P&gt;

&lt;P&gt;&amp;lt;input type="multiselect" token="Camera" searchWhenChanged="true"&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:31:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343384#M22338</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-07-31T14:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343385#M22339</link>
      <description>&lt;P&gt;This is a perfect use case for &lt;CODE&gt;tags&lt;/CODE&gt;.  Setup the tagging and then search by tag from now on.  Cake.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:33:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343385#M22339</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-31T14:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343386#M22340</link>
      <description>&lt;P&gt;I like the idea of the lookup table but I have thousands of camera names so it would be very tedious. Is there a way that I could make some sort of IF statement that like:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;if the tunnel name contains four letters at the beginning then get rid of the numbers.&lt;/LI&gt;
&lt;LI&gt;if the tunnel name contains CT1 at the end, get rid of the CT1&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 31 Jul 2017 14:46:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343386#M22340</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T14:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343387#M22341</link>
      <description>&lt;P&gt;Is there a way when I set up the tags to say anything containing PSA2 tag as PSA2? So 83472PSA2 and 6PSA2 would be tagged as PSA2?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 15:32:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343387#M22341</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T15:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343388#M22342</link>
      <description>&lt;P&gt;No, but you can create an &lt;CODE&gt;eventtype&lt;/CODE&gt; with wildcards and then use that.  Also, once that is done, you can tag each eventtype and use tags that way.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 15:40:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343388#M22342</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-31T15:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343389#M22343</link>
      <description>&lt;P&gt;So I wouldn't be able to put Camera="*PSA2" as the field value pair? What would the eventtype look like?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 15:54:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343389#M22343</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T15:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343390#M22344</link>
      <description>&lt;P&gt;Create an eventtype called &lt;CODE&gt;PSA2&lt;/CODE&gt; which has &lt;CODE&gt;index=YouShouldAlwaysSpecifyAnIndex sourcetype=YourSourcetypeHere CameraName=PSA2*&lt;/CODE&gt; and then a tag called &lt;CODE&gt;PSA2&lt;/CODE&gt; which has &lt;CODE&gt;eventtype=PSA2&lt;/CODE&gt; and the definition.  Then search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=YouShouldAlwaysSpecifyAnIndex sourcetype=YourSourcetypeHere tag=PSA2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:01:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343390#M22344</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-07-31T16:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343391#M22345</link>
      <description>&lt;P&gt;It is not working for me. Sorry I am very very very new to splunk! So I have &lt;CODE&gt;host="splunk" sourcetype="csv" Tunnel=*PSA2&lt;/CODE&gt; in the search string of the eventtype and they tag as PSA2. When I search tag=PSA2, nothing comes up.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343391#M22345</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T16:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343392#M22346</link>
      <description>&lt;P&gt;JUST KIDDING!!! I had the wrong time frame! It works! Thank you soooooooooo much!!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:29:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343392#M22346</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-07-31T16:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Combine options in a dropdown menu</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343393#M22347</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/53091"&gt;@sarahw3&lt;/a&gt;&lt;BR /&gt;
Try this option,&lt;/P&gt;

&lt;P&gt;&amp;lt;input type="text" token="Camera_pre_tok"&amp;gt;&lt;BR /&gt;
      &amp;lt;label&amp;gt;Optional: Filter camera populating &amp;lt;/label&amp;gt;&lt;BR /&gt;
      &amp;lt;default&amp;gt;* &amp;lt;/default&amp;gt;&lt;BR /&gt;
    &amp;lt;/input&amp;gt;&lt;/P&gt;

&lt;P&gt;Note: in text box you can give *PSP* it will give you PSP related values in the multiselect. &lt;/P&gt;

&lt;P&gt;&amp;lt;input type="multiselect" token="Camera" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;
&amp;lt;label&amp;gt; Select a Camera &amp;lt;/label&amp;gt;&lt;BR /&gt;
&amp;lt;choice value=""&amp;gt; ALL &amp;lt;/choice&amp;gt;&lt;BR /&gt;
&amp;lt;search&amp;gt;&lt;BR /&gt;
&amp;lt;query&amp;gt;sourcetype=csv Stata=$state$ Camera=$Camera_pre_tok$ | stats count by Camera| fields - count&amp;lt;/query&amp;gt;&lt;BR /&gt;
&amp;lt;/search&amp;gt;&lt;BR /&gt;
&amp;lt;fieldForLabel&amp;gt;Camera&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;
&amp;lt;fieldForValue&amp;gt;Camera&amp;gt;/fieldForValue&amp;gt;&lt;BR /&gt;
&amp;lt;prefix/&amp;gt;&lt;BR /&gt;
&amp;lt;valuePrefix&amp;gt;Camera="&amp;gt;/valuePrefix&amp;gt;&lt;BR /&gt;
&amp;lt;valueSuffix&amp;gt;*"&amp;gt;/valueSuffix&amp;gt;&lt;BR /&gt;
&amp;lt;delimiter&amp;gt; OR &amp;gt;/delimiter&amp;gt;&lt;BR /&gt;
&amp;lt;suffix/&amp;gt;&lt;BR /&gt;
&amp;lt;/input&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Combine-options-in-a-dropdown-menu/m-p/343393#M22347</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2020-09-29T15:10:12Z</dc:date>
    </item>
  </channel>
</rss>

