<?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 Dropdown - how to keep duplicate values in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-how-to-keep-duplicate-values/m-p/504980#M33451</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using a dropdown with a dynamic option search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup serverlocations.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;field for Label:&amp;nbsp;locationname&lt;BR /&gt;field for Value: servername&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The serverlocations.csv looks like this in a regular splunk search:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;locationname&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;servername&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;UK-London&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;server1.example.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;DE-Berlin&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;server1.example.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;US-NewYork&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;server2.example.com&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is my dropdown shows only the Labels UK-London and US-NewYork. It removes DE-Berlin from the dropdown as if my search would be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup serverlocations.csv
| dedup servername&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But actually I want all three locationnames in my dropdown. I am totally fine if I get the same search results on the dashboards then, because both are using the same servername. I do not understand why splunk is handling my search with a dedup, especially because my search result is looking good as long as it is not used by the dropdown.&lt;/P&gt;&lt;P&gt;Do you have a reason for that behaviour or can you tell me how to avoid that?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 13:34:33 GMT</pubDate>
    <dc:creator>cornemrc</dc:creator>
    <dc:date>2020-06-18T13:34:33Z</dc:date>
    <item>
      <title>Dropdown - how to keep duplicate values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-how-to-keep-duplicate-values/m-p/504980#M33451</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using a dropdown with a dynamic option search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup serverlocations.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;field for Label:&amp;nbsp;locationname&lt;BR /&gt;field for Value: servername&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The serverlocations.csv looks like this in a regular splunk search:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;locationname&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;servername&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;UK-London&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;server1.example.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;DE-Berlin&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;server1.example.com&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;US-NewYork&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;server2.example.com&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is my dropdown shows only the Labels UK-London and US-NewYork. It removes DE-Berlin from the dropdown as if my search would be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup serverlocations.csv
| dedup servername&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But actually I want all three locationnames in my dropdown. I am totally fine if I get the same search results on the dashboards then, because both are using the same servername. I do not understand why splunk is handling my search with a dedup, especially because my search result is looking good as long as it is not used by the dropdown.&lt;/P&gt;&lt;P&gt;Do you have a reason for that behaviour or can you tell me how to avoid that?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 13:34:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-how-to-keep-duplicate-values/m-p/504980#M33451</guid>
      <dc:creator>cornemrc</dc:creator>
      <dc:date>2020-06-18T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown - how to keep duplicate values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-how-to-keep-duplicate-values/m-p/505067#M33458</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222668"&gt;@cornemrc&lt;/a&gt;&amp;nbsp;try something like the following. SPL is used to create servername as delimited string after combining servername with locationname. Using &lt;STRONG&gt;&amp;lt;eval&amp;gt;&lt;/STRONG&gt; to split the servername set the tokens servername and location name using &lt;STRONG&gt;$label$&lt;/STRONG&gt;&amp;nbsp;on &lt;STRONG&gt;&amp;lt;change&amp;gt;&lt;/STRONG&gt; of input value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="dropdown" token="serverlocation"&amp;gt;
      &amp;lt;label&amp;gt;Server/Location&amp;lt;/label&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;locationname&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;servername&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;| inputlookup serverlocations.csv
| fields servername locationname
| eval servername=servername."|".locationname&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;eval token="servername"&amp;gt;mvindex(split($value$,"|"),0)&amp;lt;/eval&amp;gt;
        &amp;lt;set token="locationname"&amp;gt;$label$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 19:10:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Dropdown-how-to-keep-duplicate-values/m-p/505067#M33458</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-06-18T19:10:35Z</dc:date>
    </item>
  </channel>
</rss>

