<?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 Drilldown Search in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451635#M29653</link>
    <description>&lt;P&gt;I have a search table that lists user ids in the form of [domain][userid] and a numeric value.  There is a drilldown set on the user id that opens a new search where the user id becomes the search value.  The problem is that when the new search opens I have to manually replace the single '\' with '\' so the search will run.&lt;/P&gt;

&lt;P&gt;Drilldown search looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="pan" user="$row.user$" | stats count by http_category | sort -count  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where $row.user$ is the carried forward value (eg uni\3333333) and is what I have to manually correct to uni\3333333.&lt;/P&gt;

&lt;P&gt;Is there a way that I can have this manual correction made automatically as part of the drilldown search string.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2019 03:44:55 GMT</pubDate>
    <dc:creator>balcv</dc:creator>
    <dc:date>2019-03-21T03:44:55Z</dc:date>
    <item>
      <title>Drilldown Search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451635#M29653</link>
      <description>&lt;P&gt;I have a search table that lists user ids in the form of [domain][userid] and a numeric value.  There is a drilldown set on the user id that opens a new search where the user id becomes the search value.  The problem is that when the new search opens I have to manually replace the single '\' with '\' so the search will run.&lt;/P&gt;

&lt;P&gt;Drilldown search looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="pan" user="$row.user$" | stats count by http_category | sort -count  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where $row.user$ is the carried forward value (eg uni\3333333) and is what I have to manually correct to uni\3333333.&lt;/P&gt;

&lt;P&gt;Is there a way that I can have this manual correction made automatically as part of the drilldown search string.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 03:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451635#M29653</guid>
      <dc:creator>balcv</dc:creator>
      <dc:date>2019-03-21T03:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Drilldown Search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451636#M29654</link>
      <description>&lt;P&gt;Hello @balcv,&lt;/P&gt;

&lt;P&gt;I suppose your drilldown looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table&amp;gt;
   &amp;lt;search&amp;gt;
      ...
   &amp;lt;/search&amp;gt;
   &amp;lt;drilldown&amp;gt;
      &amp;lt;link target="_blank"&amp;gt;search?q=index=pan%20user=%22$row.user$%22&amp;lt;/link&amp;gt;
   &amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can use eval expressions in drilldowns. Here is a similar question: &lt;A href="https://answers.splunk.com/answers/583525/how-do-you-use-eval-in-xml-drilldown.html"&gt;How do you use eval in XML drilldown?&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;drilldown&amp;gt;
   &amp;lt;eval token="usertoken"&amp;gt;replace($row.user$,"\\\\","\\\\")&amp;lt;/eval&amp;gt;
   &amp;lt;link target="_blank"&amp;gt;search?q=index=pan%20user=%22$usertoken$%22&amp;lt;/link&amp;gt;
&amp;lt;/drilldown&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The additional backslashes in the replace function are required for escaping the actual backslashes. &lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 08:35:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451636#M29654</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-03-21T08:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Drilldown Search</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451637#M29655</link>
      <description>&lt;P&gt;Perfect.  Thank you.  I did have to make one alteration to the code you provided and that was replace the %22 and %20 with the actual characters, but other than that, this is exactly what I needed.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 21:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Drilldown-Search/m-p/451637#M29655</guid>
      <dc:creator>balcv</dc:creator>
      <dc:date>2019-03-21T21:40:32Z</dc:date>
    </item>
  </channel>
</rss>

