<?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: Use two depends in a dashboard panel in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341488#M39843</link>
    <description>&lt;P&gt;Great!! I'm glad we got it sorted.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Mar 2018 16:45:29 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2018-03-09T16:45:29Z</dc:date>
    <item>
      <title>Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341483#M39838</link>
      <description>&lt;P&gt;Hi at all,&lt;BR /&gt;
in a dashboard, I need the possibility to choose between two searches to display results in a panel and at the same time to display an html message if there's no result in each of them.&lt;BR /&gt;
In other words, I'd like to use two depends from Splunk Dashboard Examples App in a panel: a "&lt;STRONG&gt;Link Switcher&lt;/STRONG&gt;" and a "&lt;STRONG&gt;Null Search Swapper&lt;/STRONG&gt;".&lt;BR /&gt;
The "Link switcher" correctly runs but I always have the html message, in other words the "Null Search Swapper" doesn't run.&lt;/P&gt;

&lt;P&gt;This is my code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Home Page&amp;lt;/label&amp;gt;
  &amp;lt;search id="search_1"&amp;gt;
    &amp;lt;query&amp;gt;
      my_search1
    &amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;$Time.earliest$&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;$Time.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;progress&amp;gt;
      &amp;lt;condition match="$job.resultCount$ == 0"&amp;gt;
        &amp;lt;set token="show_html1"&amp;gt;Errors&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition&amp;gt;
        &amp;lt;unset token="show_html1"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
    &amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;search id="search_2"&amp;gt;
    &amp;lt;query&amp;gt;
      my_search2
    &amp;lt;/query&amp;gt;
    &amp;lt;earliest&amp;gt;$Time.earliest$&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;$Time.latest$&amp;lt;/latest&amp;gt;
    &amp;lt;progress&amp;gt;
      &amp;lt;condition match="$job.resultCount$ == 0"&amp;gt;
        &amp;lt;set token="show_html2"&amp;gt;Errors&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition&amp;gt;
        &amp;lt;unset token="show_html2"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
    &amp;lt;/progress&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="Time"&amp;gt;
      &amp;lt;label&amp;gt;Periodo&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;@d&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;input type="link" token="application"&amp;gt;
        &amp;lt;label&amp;gt;Area Applicativa:&amp;lt;/label&amp;gt;
        &amp;lt;choice value="One"&amp;gt;One&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="Two"&amp;gt;Two&amp;lt;/choice&amp;gt;
        &amp;lt;default&amp;gt;One&amp;lt;/default&amp;gt;
        &amp;lt;change&amp;gt;
          &amp;lt;condition value="One"&amp;gt;
            &amp;lt;set token="showOne"&amp;gt;true&amp;lt;/set&amp;gt;
            &amp;lt;unset token="showTwo"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;condition value="Two"&amp;gt;
          &amp;lt;unset token="showOne"&amp;gt;&amp;lt;/unset&amp;gt;
            &amp;lt;set token="showTwo"&amp;gt;true&amp;lt;/set&amp;gt;
            &amp;lt;/condition&amp;gt;
          &amp;lt;/change&amp;gt;
        &amp;lt;/input&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table depends="$showOne$" rejects="$show_html1$"&amp;gt;
        &amp;lt;search base="search_1"&amp;gt;
          &amp;lt;query&amp;gt;
            my_query
            &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
      &amp;lt;html depends="$show_html1$"&amp;gt;
         &amp;lt;p style="color:green;margin-left:30px;font-size:30px"&amp;gt;No Errors&amp;lt;/p&amp;gt;
      &amp;lt;/html&amp;gt;
      &amp;lt;table depends="$showTwo$" rejects="$show_html2$"&amp;gt;
        &amp;lt;search base="search_2"&amp;gt;
          &amp;lt;query&amp;gt;
            my_search
            &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
      &amp;lt;html depends="$show_html2$"&amp;gt;
         &amp;lt;p style="color:green;margin-left:30px;font-size:30px"&amp;gt;No Errors&amp;lt;/p&amp;gt;
      &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't understand if there's something wrong or if it's not possible to combine two depends.&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 09:07:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341483#M39838</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-03-08T09:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341484#M39839</link>
      <description>&lt;P&gt;I'm pretty confused by these two lines:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;table depends="$showOne$" rejects="$show_html1$"&amp;gt;
&amp;lt;table depends="$showTwo$" rejects="$show_html2$"&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What should happen if &lt;CODE&gt;$showOne$&lt;/CODE&gt; and &lt;CODE&gt;$show_html1$&lt;/CODE&gt; are both defined/set? Should it display or not? Likewise for the Two/2 line - what happens if both are defined/set?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 16:00:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341484#M39839</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-08T16:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341485#M39840</link>
      <description>&lt;P&gt;Probably this is the problem: &lt;BR /&gt;
I have two conditions: one guided by Link Switcher and one guided by Null Swapper.&lt;BR /&gt;
these are the eight situations:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;$showOne$==true and $show_html1$==true and $show_html2$==true
this means that I want display data1 and I haven't both data1 and data2 to display
in this case I have two messages NO CORRECT&lt;/LI&gt;
&lt;LI&gt;$showOne$==true and $show_html1$==true and $show_html2$==false
this means that I want display data1 and I haven't data1 and I have data2 to display
in this case I have one message CORRECT&lt;/LI&gt;
&lt;LI&gt;$showTwo$==true and $show_html1$==true and $show_html2$==true
this means that I want display data2 and I haven't both data1 and data2 to display
in this case I have two messages NO CORRECT&lt;/LI&gt;
&lt;LI&gt;$showTwo$==true and $show_html1$==true and $show_html2$==false
this means that I want display data2 and I haven't data1 and I have data2 to display
in this case I have a chart and one message NO CORRECT&lt;/LI&gt;
&lt;LI&gt;$showOne$==true and $show_html1$==false and $show_html2$==true
this means that I want display data1 and I have data1 and I haven't data2 to display
in this case I have a chart and one message CORRECT&lt;/LI&gt;
&lt;LI&gt;$showOne$==true and $show_html1$==false and $show_html2$==false
this means that I want display data1 and I have data1 and I have data2 to display
in this case I haven't messages CORRECT&lt;/LI&gt;
&lt;LI&gt;$showTwo$==true and $show_html1$==false and $show_html2$==true
this means that I want display data2 and I have data1 and I haven't data2 to display
in this case I have a chart and one message NO CORRECT&lt;/LI&gt;
&lt;LI&gt;$showTwo$==true and $show_html1$==false and $show_html2$==false
this means that I want display data1 and I have data1 and I have data2 to display
in this case I haven't messages CORRECT&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;where:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;$showOne$ is a chart with the same data of $show_html1$&lt;/LI&gt;
&lt;LI&gt;$showTwo$ is a chart with the same data of $show_html2$&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;In few words, I have problems when:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;$show_html1$ and $show_html2$ are both true because I have two messages;&lt;/LI&gt;
&lt;LI&gt;one of them is true and the other is false and I want to display in a chart data of the other search.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I hope to be clear, the problem is to manage two switchers at the same time!&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341485#M39840</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-29T18:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341486#M39841</link>
      <description>&lt;P&gt;I'm trying to wrap my head about this, but I am not sure I get it. My best guess is that we need to separate the &lt;CODE&gt;depends&lt;/CODE&gt; and &lt;CODE&gt;rejects&lt;/CODE&gt; statements. Does it work if you replace the final &lt;CODE&gt;&amp;lt;row&amp;gt;&lt;/CODE&gt; element with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;row&amp;gt;
     &amp;lt;panel depends="$showOne$"&amp;gt;
       &amp;lt;table rejects="$show_html1$"&amp;gt;
         &amp;lt;search base="search_1"&amp;gt;
           &amp;lt;query&amp;gt;
             my_query
             &amp;lt;/query&amp;gt;
         &amp;lt;/search&amp;gt;
         &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
         &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
         &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
         &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
       &amp;lt;/table&amp;gt;
       &amp;lt;html depends="$show_html1$"&amp;gt;
          &amp;lt;p style="color:green;margin-left:30px;font-size:30px"&amp;gt;No Errors&amp;lt;/p&amp;gt;
       &amp;lt;/html&amp;gt;
     &amp;lt;/panel&amp;gt;
     &amp;lt;panel depends="$showTwo$"&amp;gt;
       &amp;lt;table rejects="$show_html2$"&amp;gt;
         &amp;lt;search base="search_2"&amp;gt;
           &amp;lt;query&amp;gt;
             my_search
             &amp;lt;/query&amp;gt;
         &amp;lt;/search&amp;gt;
         &amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;
         &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
         &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
         &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
         &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
       &amp;lt;/table&amp;gt;
       &amp;lt;html depends="$show_html2$"&amp;gt;
          &amp;lt;p style="color:green;margin-left:30px;font-size:30px"&amp;gt;No Errors&amp;lt;/p&amp;gt;
       &amp;lt;/html&amp;gt;
     &amp;lt;/panel&amp;gt;
   &amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Mar 2018 19:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341486#M39841</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-08T19:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341487#M39842</link>
      <description>&lt;P&gt;It works!&lt;BR /&gt;
Thank you very much.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 16:33:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341487#M39842</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-03-09T16:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341488#M39843</link>
      <description>&lt;P&gt;Great!! I'm glad we got it sorted.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 16:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/341488#M39843</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-09T16:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Use two depends in a dashboard panel</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/563884#M46385</link>
      <description>&lt;P&gt;I have used below syntax so a panel will stay hidden until &lt;STRONG&gt;2 or more&lt;/STRONG&gt; conditions have been met. Hopefully helps.&lt;BR /&gt;&lt;BR /&gt;&amp;lt;panel depends="$isLinux$$isHealthy$"&amp;gt;&lt;/P&gt;&lt;P&gt;That panel only shows when both tokens have a &amp;lt;set&amp;gt; value. If any token is &amp;lt;unset&amp;gt; then that panel is hidden.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 02:55:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Use-two-depends-in-a-dashboard-panel/m-p/563884#M46385</guid>
      <dc:creator>shandr</dc:creator>
      <dc:date>2021-08-19T02:55:07Z</dc:date>
    </item>
  </channel>
</rss>

