<?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: Get only one value on drilldown for multiple values in a cell in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325727#M97116</link>
    <description>&lt;P&gt;Actually not. I have others fields which would require the same. Is there not any other command that make the trick like &lt;CODE&gt;mvexpand&lt;/CODE&gt; but for multiple fields?&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2017 10:51:15 GMT</pubDate>
    <dc:creator>SirHill17</dc:creator>
    <dc:date>2017-10-25T10:51:15Z</dc:date>
    <item>
      <title>Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325723#M97112</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am trying to give cell value using drilldown as parameter to another dashboard. Below is how I have defined it:&lt;/P&gt;

&lt;P&gt;The source is a XML file containing multiple values for the same category. The output is a table, meaining some column contain a single value and some others multiple. So what I am trying to do it when clicking on a cell which contains multiple value I only want to have one value and not all. &lt;/P&gt;

&lt;P&gt;I tried to use:&lt;/P&gt;

&lt;P&gt;$row.MyField$&lt;BR /&gt;
$click.value$&lt;BR /&gt;
$cell.value$&lt;/P&gt;

&lt;P&gt;But I didn't find any one working for my case.&lt;/P&gt;

&lt;P&gt;Does anyone can help with that?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 08:33:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325723#M97112</guid>
      <dc:creator>SirHill17</dc:creator>
      <dc:date>2017-10-25T08:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325724#M97113</link>
      <description>&lt;P&gt;@SirHill17, can you please add the Table with Multiple Values Column Field Name and sample multi-value data. Also when you want to select one, is it first one or specific that you click?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 09:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325724#M97113</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-25T09:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325725#M97114</link>
      <description>&lt;P&gt;So the XML file looks like that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" standalone="yes" ?&amp;gt;
&amp;lt;SymCLI_ML&amp;gt;
  &amp;lt;Symmetrix&amp;gt;
    &amp;lt;Symm_Info&amp;gt;
      &amp;lt;symid&amp;gt;0000000001&amp;lt;/symid&amp;gt;
    &amp;lt;/Symm_Info&amp;gt;
    &amp;lt;Device&amp;gt;
      &amp;lt;Dev_Info&amp;gt;
        &amp;lt;dev_name&amp;gt;00001&amp;lt;/dev_name&amp;gt;
        &amp;lt;configuration&amp;gt;RDF1+TDEV&amp;lt;/configuration&amp;gt;
        &amp;lt;rdfa_backed&amp;gt;True&amp;lt;/rdfa_backed&amp;gt;
      &amp;lt;/Dev_Info&amp;gt;
    &amp;lt;/Device&amp;gt;
    &amp;lt;Device&amp;gt;
      &amp;lt;Dev_Info&amp;gt;
        &amp;lt;dev_name&amp;gt;00002&amp;lt;/dev_name&amp;gt;
        &amp;lt;configuration&amp;gt;RDF1+TDEV&amp;lt;/configuration&amp;gt;
        &amp;lt;rdfa_backed&amp;gt;True&amp;lt;/rdfa_backed&amp;gt;
      &amp;lt;/Dev_Info&amp;gt;
    &amp;lt;Device&amp;gt;
  &amp;lt;/Symmetrix&amp;gt;
&amp;lt;/SymCLI_ML&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The table like that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Row Number   symid               dev_name
1                  0000000001    00001
                                 00002
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I would like to have the value of the device when clicking on it, when I only use the default Cell drilldown it works fine, but when I want to give the value as a parameter to another dashboard using below command it gives both values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown target="_blank"&amp;gt;
   &amp;lt;link name="Device Name"&amp;gt;
    &amp;lt;![CDATA[/app/myapp/mydashboard?form.var_symid=$row.symid$&amp;amp;form.var_device=$row.dev_name$&amp;amp;earliest=0&amp;amp;latest=]]&amp;gt;
  &amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Oct 2017 09:34:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325725#M97114</guid>
      <dc:creator>SirHill17</dc:creator>
      <dc:date>2017-10-25T09:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325726#M97115</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/198076"&gt;@SirHill17&lt;/a&gt;, please try &lt;CODE&gt;$click.value2$&lt;/CODE&gt; in the drilldown code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;drilldown target="_blank"&amp;gt;
       &amp;lt;condition field="dev_name"&amp;gt;
          &amp;lt;link&amp;gt;
           &amp;lt;![CDATA[/app/myapp/mydashboard?form.var_symid=$row.symid$&amp;amp;form.var_device=$click.value2$&amp;amp;earliest=0&amp;amp;latest=]]&amp;gt;
         &amp;lt;/link&amp;gt;
       &amp;lt;/condition&amp;gt;
     &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just curious, if you are only interested in symid and dev_name and dev_name is the only multivalue field in your table, can you try the following to convert from multi value to single value? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;YourBaseSearch&amp;gt;
 |  table symid dev_name
 |  mvexpand dev_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325726#M97115</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T16:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325727#M97116</link>
      <description>&lt;P&gt;Actually not. I have others fields which would require the same. Is there not any other command that make the trick like &lt;CODE&gt;mvexpand&lt;/CODE&gt; but for multiple fields?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 10:51:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325727#M97116</guid>
      <dc:creator>SirHill17</dc:creator>
      <dc:date>2017-10-25T10:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325728#M97117</link>
      <description>&lt;P&gt;@SirHill17, First off, I fill &lt;CODE&gt;$click.value2$&lt;/CODE&gt; should work even with Multi Valued Fields. Please refer to the Splunk documentation for difference between &lt;CODE&gt;$click.value$&lt;/CODE&gt; and &lt;CODE&gt;$click.value2$&lt;/CODE&gt;: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#Predefined_drilldown_tokens"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#Predefined_drilldown_tokens&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;you can use &lt;CODE&gt;mvzip()&lt;/CODE&gt; to stitch two multivalued fields together with a delimeter (default is comma) and then cascade mvzip() to have several multivalues sticked together. Then you can apply &lt;CODE&gt;mvexpand&lt;/CODE&gt; to make all of them single value at the same time. In order to get back all the fields you will have to use &lt;CODE&gt;split()&lt;/CODE&gt; with delimeter and followed by &lt;CODE&gt;mvindex()&lt;/CODE&gt; function to pull specific fields based on their index.&lt;/P&gt;

&lt;P&gt;Following is an example based on sample data provided:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| rename SymCLI_ML.Symmetrix.Symm_Info.* as * 
| rename SymCLI_ML.Symmetrix.Device.Dev_Info.* as * 
| eval data=mvzip(dev_name,mvzip(configuration,rdfa_backed,","),",")
| table data
| mvexpand data
| eval data=split(data,",")
| eval dev_name=mvindex(data,0)
| eval configuration=mvindex(data,1)
| eval rdfa_backed=mvindex(data,2)
| table dev_name configuration rdfa_backed
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Oct 2017 11:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325728#M97117</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-25T11:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325729#M97118</link>
      <description>&lt;P&gt;Great ! &lt;CODE&gt;$click.value2$&lt;/CODE&gt; works!&lt;/P&gt;

&lt;P&gt;Thanks for your help @niketnilay&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 11:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325729#M97118</guid>
      <dc:creator>SirHill17</dc:creator>
      <dc:date>2017-10-25T11:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Get only one value on drilldown for multiple values in a cell</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325730#M97119</link>
      <description>&lt;P&gt;@SirHill17, glad it worked. Do try out the example to convert all multi-valued fields to Single value, if that is your use case. Please let me know if it does not work and up vote if it does &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 11:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-only-one-value-on-drilldown-for-multiple-values-in-a-cell/m-p/325730#M97119</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-25T11:15:04Z</dc:date>
    </item>
  </channel>
</rss>

