<?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: Nested Token Usage in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318171#M20487</link>
    <description>&lt;P&gt;and also if i am giving like below, it is throwing me a warning saying invalid attribute name:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;condition match=($token1$==4 AND $token2$==S)&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Jan 2018 07:14:02 GMT</pubDate>
    <dc:creator>bharathkumarnec</dc:creator>
    <dc:date>2018-01-19T07:14:02Z</dc:date>
    <item>
      <title>Nested Token Usage</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318168#M20484</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I wanted to pass a token value into another input drop down:&lt;/P&gt;

&lt;P&gt;If Token1=4 &amp;amp; Token2=S Query1 should run&lt;BR /&gt;
If Token1=5 &amp;amp; Token2=S Query2 should run&lt;BR /&gt;
If Token1=4 &amp;amp; Token2=N Query2 should run&lt;BR /&gt;
If Token1=5 &amp;amp; Token2=N Query2 should run&lt;/P&gt;

&lt;P&gt;Kindly help me out in this scenario.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
BK&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 17:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318168#M20484</guid>
      <dc:creator>bharathkumarnec</dc:creator>
      <dc:date>2018-01-17T17:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Token Usage</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318169#M20485</link>
      <description>&lt;P&gt;There is a way to have conditional components on dashboards using the "depends" input attribute. A good start would be to look at the "depends" options on this page: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;When you define the tokens you can set/unset additional tokens based on your input values. it might look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input (your input settings)&amp;gt;
     &amp;lt;change&amp;gt;
          &amp;lt;condition match=($token1$==4 AND $token2$==S)&amp;gt;
              &amp;lt;set token="query1"&amp;gt;&amp;lt;/set&amp;gt;
              &amp;lt;unset token="query2"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;/condition&amp;gt;
          &amp;lt;condition match=($token1$!=4 AND $token2$!=S)&amp;gt;
              &amp;lt;set token="query2"&amp;gt;&amp;lt;/set&amp;gt;
              &amp;lt;unset token="query1"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;/condition&amp;gt;
     &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You would then use depends for the two searches to either hide or display them. This would be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel depends="$query1$"&amp;gt;
        &amp;lt;title&amp;gt;Query 1&amp;lt;/title&amp;gt;
             &amp;lt;search&amp;gt;&amp;lt;query&amp;gt;Your Query1&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;panel depends="$query2$"&amp;gt;
        &amp;lt;title&amp;gt;Query 2&amp;lt;/title&amp;gt;
             &amp;lt;search&amp;gt;&amp;lt;query&amp;gt;Your Query2&amp;lt;/query&amp;gt;&amp;lt;/search&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There may be some slight adjustments in the syntax needed and your panels will need viz options. Hopefully this gets you set on the right direction. Depending on how you set your tokens (might not be an input) there will be some adjustments needed.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:42:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318169#M20485</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2018-01-18T15:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Token Usage</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318170#M20486</link>
      <description>&lt;P&gt;Thanks for the inputs!&lt;/P&gt;

&lt;P&gt;The above mentioned change conditions need to be incorporated under dropdown inputs where we assigned tokens?? or oustide the dropdown inputs??&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 21:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318170#M20486</guid>
      <dc:creator>bharathkumarnec</dc:creator>
      <dc:date>2018-01-18T21:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Token Usage</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318171#M20487</link>
      <description>&lt;P&gt;and also if i am giving like below, it is throwing me a warning saying invalid attribute name:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;condition match=($token1$==4 AND $token2$==S)&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jan 2018 07:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318171#M20487</guid>
      <dc:creator>bharathkumarnec</dc:creator>
      <dc:date>2018-01-19T07:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Token Usage</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318172#M20488</link>
      <description>&lt;P&gt;@mdsnmss it worked after making some tweeking. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 14:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318172#M20488</guid>
      <dc:creator>bharathkumarnec</dc:creator>
      <dc:date>2018-01-19T14:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Token Usage</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318173#M20489</link>
      <description>&lt;P&gt;Sorry, just saw the previous comments. Glad you were able to get it working!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 14:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Nested-Token-Usage/m-p/318173#M20489</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2018-01-19T14:26:31Z</dc:date>
    </item>
  </channel>
</rss>

