<?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 How to change Inline Search based on the click.value in Simple XML? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176201#M50597</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I am trying to implement an inline chart whose search criteria will change based on the &lt;CODE&gt;$click.value$&lt;/CODE&gt; on the table. &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;Table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Column-A   Column-B
ABC          456456
NBH          5635635
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Drilldown will be based on the value of &lt;CODE&gt;$row.Column-A$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now the inline search should change based on whether the value selected is ABC or NBC&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IF $row.Column-A$=ABC

&amp;lt;chart&amp;gt;
index=blah sourcetype=blah ...|timechart
&amp;lt;/chart&amp;gt;


 IF $row.Column-A$=NBC 

   &amp;lt;chart&amp;gt;
    index=blah2 sourcetype=blah2 ...|timechart
    &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible to toggle the depend field like this? Any Ideas?&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2015 13:27:53 GMT</pubDate>
    <dc:creator>theouhuios</dc:creator>
    <dc:date>2015-06-25T13:27:53Z</dc:date>
    <item>
      <title>How to change Inline Search based on the click.value in Simple XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176201#M50597</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I am trying to implement an inline chart whose search criteria will change based on the &lt;CODE&gt;$click.value$&lt;/CODE&gt; on the table. &lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;Table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Column-A   Column-B
ABC          456456
NBH          5635635
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Drilldown will be based on the value of &lt;CODE&gt;$row.Column-A$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now the inline search should change based on whether the value selected is ABC or NBC&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IF $row.Column-A$=ABC

&amp;lt;chart&amp;gt;
index=blah sourcetype=blah ...|timechart
&amp;lt;/chart&amp;gt;


 IF $row.Column-A$=NBC 

   &amp;lt;chart&amp;gt;
    index=blah2 sourcetype=blah2 ...|timechart
    &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is it possible to toggle the depend field like this? Any Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 13:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176201#M50597</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2015-06-25T13:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Inline Search based on the click.value in Simple XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176202#M50598</link>
      <description>&lt;P&gt;hi theouhuios,&lt;BR /&gt;
try like this and let me know if this solves your problem&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;In-Page Drilldown&amp;lt;/label&amp;gt;
  &amp;lt;description/&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;!--
            Create an input to store the drilldown value. It will be hidden using custom javascript when
            the dashboard is loaded.
         --&amp;gt;

    &amp;lt;input type="text" token="Column_A" searchWhenChanged="true"/&amp;gt;
  &amp;lt;/fieldset&amp;gt;

  &amp;lt;row&amp;gt;
    &amp;lt;table id="master"&amp;gt;
      &amp;lt;title&amp;gt;Display &amp;lt;/title&amp;gt;
      &amp;lt;searchString&amp;gt;index=index_name sourcetype=sourcetype_file |table Column_A  Column_B&amp;lt;/searchString&amp;gt;
      &amp;lt;!-- Set the type of of drilldown, since we will always consume the same field, use row--&amp;gt;
      &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
      &amp;lt;drilldown&amp;gt;
        &amp;lt;!-- Use set to specify the new token to be created.
                     Use any token from the page or from the click event to produce the value needed. --&amp;gt;
        &amp;lt;set token="Column_A "&amp;gt;$row.Column_A$&amp;lt;/set&amp;gt;
        &amp;lt;!-- If we also set the form.sourcetype the input will get updated too --&amp;gt;
        &amp;lt;set token="form.Column_A "&amp;gt;$row.Column_A$&amp;lt;/set&amp;gt;
      &amp;lt;/drilldown&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;

  &amp;lt;row&amp;gt;

   &amp;lt;panel id="detail" depends="$Column_A$"&amp;gt;
     &amp;lt;title&amp;gt;Column_A=$Column_A$ &amp;lt;/title&amp;gt;

     &amp;lt;input type="dropdown" token="newstatus" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Change the value of Column_A&amp;lt;/label&amp;gt;
        &amp;lt;choice value="ABC"&amp;gt;ABC&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="NBH"&amp;gt;NBH&amp;lt;/choice&amp;gt;
        &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;

        &amp;lt;change&amp;gt;
          &amp;lt;condition value="ABC"&amp;gt;
            &amp;lt;set token="new_search"&amp;gt;index=index_name sourcetype=sourcetype_file  Column_A=$Column_A$ |timechart count &amp;lt;/set&amp;gt;
          &amp;lt;/condition&amp;gt;

          &amp;lt;condition value="NBH"&amp;gt;
            &amp;lt;set token="new_search"&amp;gt;index=index_name sourcetype=sourcetype_file  Column_A=$Column_A$ |timechart count by Column_B&amp;lt;/set&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;/change&amp;gt;
  &amp;lt;/input&amp;gt;

      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;change the chart depending on the value of Column_A&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;$new_search$&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/chart&amp;gt;

   &amp;lt;/panel&amp;gt;

  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jun 2015 14:43:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176202#M50598</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2015-06-25T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Inline Search based on the click.value in Simple XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176203#M50599</link>
      <description>&lt;P&gt;I tried using the same but when I use "change" and "condition" it is not able to get the query and i get the message as "No search query Provided". Any idea if it is version issue or something else. I am currently using 6.1.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 18:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-Inline-Search-based-on-the-click-value-in-Simple/m-p/176203#M50599</guid>
      <dc:creator>hiteshkanchan</dc:creator>
      <dc:date>2015-09-02T18:48:02Z</dc:date>
    </item>
  </channel>
</rss>

