<?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 DB Connect and ConvertToIntention Problem in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/DB-Connect-and-ConvertToIntention-Problem/m-p/19534#M130</link>
    <description>&lt;P&gt;I’m attempting to make an Advanced XML dashboard that drills down from one chart to another chart. I’ve used a UI Example to get me started.&lt;/P&gt;

&lt;P&gt;The first search chart comes up fine. Unfortunately, I can’t get the drilldown search to display any results. I think the nature of my query is causing problems with the ConvertToIntention module. The unusual element in my two searches (top and drilldown) is that it’s a dbquery (i.e. DB Connect).&lt;/P&gt;

&lt;P&gt;My first HiddenSearch query contains:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | dbquery JIRA limit=1000 "select [STUFF]" | chart count("pkey") by "Fix Version"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This creates a column chart exactly as I want. When the user clicks on a column, it passes the Fix Version to a drilldown search which is in the XML as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | dbquery JIRA limit=1000 "select [STUFF]" | chart count("pkey") by "ASSIGNEE"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(“[STUFF]” is the same in each search).&lt;/P&gt;

&lt;P&gt;When I try that search alone in a search window it seems to behave fine (except that it’s for all Fix Versions). But, when I inspect the drilldown search, Splunk reports it’s trying to do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  None | dbquery JIRA limit=1000 "select [STUFF]" | chart count("pkey") by "ASSIGNEE" | search "Fix Version"="13.3.0"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And, what I believe I need is this (which in a search window does just what I want):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | dbquery JIRA limit=1000 "select [STUFF]" | search "Fix Version"="13.3.0" | chart count("pkey") by "ASSIGNEE"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, the added search term seems to showing up in the wrong place. How can I fix that?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
John&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2013 20:26:40 GMT</pubDate>
    <dc:creator>vrmerlin</dc:creator>
    <dc:date>2013-04-29T20:26:40Z</dc:date>
    <item>
      <title>DB Connect and ConvertToIntention Problem</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/DB-Connect-and-ConvertToIntention-Problem/m-p/19534#M130</link>
      <description>&lt;P&gt;I’m attempting to make an Advanced XML dashboard that drills down from one chart to another chart. I’ve used a UI Example to get me started.&lt;/P&gt;

&lt;P&gt;The first search chart comes up fine. Unfortunately, I can’t get the drilldown search to display any results. I think the nature of my query is causing problems with the ConvertToIntention module. The unusual element in my two searches (top and drilldown) is that it’s a dbquery (i.e. DB Connect).&lt;/P&gt;

&lt;P&gt;My first HiddenSearch query contains:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | dbquery JIRA limit=1000 "select [STUFF]" | chart count("pkey") by "Fix Version"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This creates a column chart exactly as I want. When the user clicks on a column, it passes the Fix Version to a drilldown search which is in the XML as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | dbquery JIRA limit=1000 "select [STUFF]" | chart count("pkey") by "ASSIGNEE"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(“[STUFF]” is the same in each search).&lt;/P&gt;

&lt;P&gt;When I try that search alone in a search window it seems to behave fine (except that it’s for all Fix Versions). But, when I inspect the drilldown search, Splunk reports it’s trying to do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  None | dbquery JIRA limit=1000 "select [STUFF]" | chart count("pkey") by "ASSIGNEE" | search "Fix Version"="13.3.0"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And, what I believe I need is this (which in a search window does just what I want):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  | dbquery JIRA limit=1000 "select [STUFF]" | search "Fix Version"="13.3.0" | chart count("pkey") by "ASSIGNEE"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, the added search term seems to showing up in the wrong place. How can I fix that?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
John&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 20:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/DB-Connect-and-ConvertToIntention-Problem/m-p/19534#M130</guid>
      <dc:creator>vrmerlin</dc:creator>
      <dc:date>2013-04-29T20:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect and ConvertToIntention Problem</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/DB-Connect-and-ConvertToIntention-Problem/m-p/19535#M131</link>
      <description>&lt;P&gt;It sounds like you're using an 'addterm' intention,  when here you need a 'stringreplace' intention.      &lt;/P&gt;

&lt;P&gt;the 'addterm' intention had that behavior where it will ultimately take the argument and try to add it as a simple searchterm in a search clause.  And if there is a reporting command involved,  addterm will happily tack on a whole other search clause just like that. &lt;/P&gt;

&lt;P&gt;the 'stringreplace' intention on the other hand, while a lot harder to work with,   is for substituting the given argument into a $foo$ token in the search as specified by a HiddenSearch module. &lt;/P&gt;

&lt;P&gt;Incidentally you might want to look at Sideview Utils.  It brings in a lot of practical improvements, a lot of which make drilldowns easier to set up and maintain. The most important being that you don't have to use or think about intentions at all anymore - with Sideview Utils you can just plug your arguments right into the $foo$ tokens and skip the messy middle part of fighting with the intention system. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://sideviewapps.com/apps/sideview-utils"&gt;http://sideviewapps.com/apps/sideview-utils&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 02:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/DB-Connect-and-ConvertToIntention-Problem/m-p/19535#M131</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-04-30T02:16:22Z</dc:date>
    </item>
  </channel>
</rss>

