<?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: How to take a token value and use it in a conditional statement  within a panel? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346644#M22594</link>
    <description>&lt;P&gt;I didn't even think of that. Awesome, thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 20:28:04 GMT</pubDate>
    <dc:creator>SLoBello</dc:creator>
    <dc:date>2018-03-14T20:28:04Z</dc:date>
    <item>
      <title>How to take a token value and use it in a conditional statement  within a panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346642#M22592</link>
      <description>&lt;P&gt;What I have set up:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;$panel_2$&lt;/STRONG&gt; is a token with a Boolean value inside the main panel. &lt;BR /&gt;
&lt;STRONG&gt;$panel_3$&lt;/STRONG&gt; is a token with a Boolean value inside panel 2&lt;BR /&gt;
(I also have other tokens in each panel that set values to the clicked field, such as &lt;STRONG&gt;$_sourcetype$&lt;/STRONG&gt;)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Main Panel&lt;/EM&gt;&lt;/STRONG&gt; has data. User clicks the &lt;EM&gt;sourcetype&lt;/EM&gt; (the row/column of interest) to access more details.&lt;BR /&gt;
&lt;STRONG&gt;$panel_2$&lt;/STRONG&gt; has been set to true and that panel is visible. User wants more details and clicks a field of interest.&lt;BR /&gt;
&lt;STRONG&gt;$panel_3$&lt;/STRONG&gt; has been set to true and that panel is visible.&lt;/P&gt;

&lt;P&gt;These work fine without issues when the &lt;EM&gt;sourcetypes&lt;/EM&gt; have similar fields for the query &lt;BR /&gt;
(i.e. &lt;EM&gt;WinEventLog:Security&lt;/EM&gt; &amp;amp; &lt;EM&gt;WinEventLog:Application&lt;/EM&gt; work fine obviously)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;THE ISSUE: I want to change between two or three queries depending on the &lt;EM&gt;sourcetype&lt;/EM&gt; selected.&lt;/STRONG&gt;&lt;BR /&gt;
(checking whether it doesn't produce results would be a plus)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;"syslog"&lt;/EM&gt;&lt;/STRONG&gt; for example does not work with the query in panel 2. &lt;/P&gt;

&lt;P&gt;I want to check the token $_sourcetype$ to "syslog" and use a query that would provide me results.&lt;/P&gt;

&lt;P&gt;panel 2&lt;BR /&gt;
...bla bla...&lt;BR /&gt;
-----search&lt;BR /&gt;
--------&lt;STRONG&gt;if ($_sourcetype$ == syslog)&lt;/STRONG&gt; &lt;BR /&gt;
--------------query&amp;gt;use this query&lt;BR /&gt;
--------&lt;STRONG&gt;else ()&lt;/STRONG&gt;&lt;BR /&gt;
--------------query&amp;gt;use this one&lt;BR /&gt;
-----/search&lt;BR /&gt;
...bla bla...&lt;BR /&gt;
/panel&lt;/P&gt;

&lt;P&gt;I know this can be done using condition match and switching between another panel. But I want to keep this within the same panel&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 22:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346642#M22592</guid>
      <dc:creator>SLoBello</dc:creator>
      <dc:date>2018-03-12T22:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a token value and use it in a conditional statement  within a panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346643#M22593</link>
      <description>&lt;P&gt;If you want to maintain that so much in the same panel, you can create a tokens that contains the one search query. In case your condition matches, you change that token to the other search you want to be run&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 22:33:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346643#M22593</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-12T22:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a token value and use it in a conditional statement  within a panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346644#M22594</link>
      <description>&lt;P&gt;I didn't even think of that. Awesome, thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 20:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346644#M22594</guid>
      <dc:creator>SLoBello</dc:creator>
      <dc:date>2018-03-14T20:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a token value and use it in a conditional statement  within a panel?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346645#M22595</link>
      <description>&lt;P&gt;@tiagofbmm, could you please share the source xml of the working solution, if possible? That way, those of trying to achieve the same thing could understand the syntax and 'how to', better. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 19:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-take-a-token-value-and-use-it-in-a-conditional-statement/m-p/346645#M22595</guid>
      <dc:creator>rey123</dc:creator>
      <dc:date>2019-03-27T19:58:41Z</dc:date>
    </item>
  </channel>
</rss>

