<?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 use  Redirector with SingleValue in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-use-Redirector-with-SingleValue/m-p/23018#M586</link>
    <description>&lt;P&gt;I would like to pass on some parameters to the next dashboard when I click on the SingleValue. I have tried to combine Redirector module from SideView app with SingleValue module, but I got this error :&lt;/P&gt;

&lt;P&gt;This view has a Splunk.Module.SingleValue module configured to push changes to downstream modules. This module never has any changes to push so this represents a configuration error.&lt;/P&gt;

&lt;P&gt;A sample code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row1_col1" group="Successful" autoRun="True"&amp;gt;
    &amp;lt;param name="search"&amp;gt;index=test Status="Successful" | dedup Server | stats  count |  rangemap field=count  default=low&amp;lt;/param&amp;gt;
    &amp;lt;module name="JobProgressIndicator"&amp;gt;
        &amp;lt;module name="SingleValue"&amp;gt;
            &amp;lt;param name="field"&amp;gt;count&amp;lt;/param&amp;gt;
            &amp;lt;param name="format"&amp;gt;decimal&amp;lt;/param&amp;gt;
            &amp;lt;param name="classField"&amp;gt;range&amp;lt;/param&amp;gt;
            &amp;lt;module name="Redirector"&amp;gt;
                       &amp;lt;param name="popup"&amp;gt;True&amp;lt;/param&amp;gt;
               &amp;lt;param name="url"&amp;gt;serverlist&amp;lt;/param&amp;gt;
                       &amp;lt;param name="arg.servertype"&amp;gt;$servertype$&amp;lt;/param&amp;gt;
            &amp;lt;/module&amp;gt;
        &amp;lt;/module&amp;gt;
    &amp;lt;/module&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I doing something not correctly? Is there another method to accomplish the same?&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2011 17:00:32 GMT</pubDate>
    <dc:creator>imrago</dc:creator>
    <dc:date>2011-06-06T17:00:32Z</dc:date>
    <item>
      <title>How to use  Redirector with SingleValue</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-use-Redirector-with-SingleValue/m-p/23018#M586</link>
      <description>&lt;P&gt;I would like to pass on some parameters to the next dashboard when I click on the SingleValue. I have tried to combine Redirector module from SideView app with SingleValue module, but I got this error :&lt;/P&gt;

&lt;P&gt;This view has a Splunk.Module.SingleValue module configured to push changes to downstream modules. This module never has any changes to push so this represents a configuration error.&lt;/P&gt;

&lt;P&gt;A sample code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="Search" layoutPanel="panel_row1_col1" group="Successful" autoRun="True"&amp;gt;
    &amp;lt;param name="search"&amp;gt;index=test Status="Successful" | dedup Server | stats  count |  rangemap field=count  default=low&amp;lt;/param&amp;gt;
    &amp;lt;module name="JobProgressIndicator"&amp;gt;
        &amp;lt;module name="SingleValue"&amp;gt;
            &amp;lt;param name="field"&amp;gt;count&amp;lt;/param&amp;gt;
            &amp;lt;param name="format"&amp;gt;decimal&amp;lt;/param&amp;gt;
            &amp;lt;param name="classField"&amp;gt;range&amp;lt;/param&amp;gt;
            &amp;lt;module name="Redirector"&amp;gt;
                       &amp;lt;param name="popup"&amp;gt;True&amp;lt;/param&amp;gt;
               &amp;lt;param name="url"&amp;gt;serverlist&amp;lt;/param&amp;gt;
                       &amp;lt;param name="arg.servertype"&amp;gt;$servertype$&amp;lt;/param&amp;gt;
            &amp;lt;/module&amp;gt;
        &amp;lt;/module&amp;gt;
    &amp;lt;/module&amp;gt;
&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I doing something not correctly? Is there another method to accomplish the same?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2011 17:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-use-Redirector-with-SingleValue/m-p/23018#M586</guid>
      <dc:creator>imrago</dc:creator>
      <dc:date>2011-06-06T17:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  Redirector with SingleValue</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-use-Redirector-with-SingleValue/m-p/23019#M587</link>
      <description>&lt;P&gt;You cannot combine SingleValue and Redirector in this way.   The error message is correct. Single Value is a dead end for the data and offers only very limited interaction.  Really all you can do is set a single 'linkSearch' param that is hardcoded, accepts NO $foo$ tokens, and will run a single static search in a hardcoded view, when the user clicks the link.  &lt;/P&gt;

&lt;P&gt;Since you're already using Sideview Utils, I would go back to its documentation (the app itself contains 23 views worth of documentation),  and navigate to this page: &lt;/P&gt;

&lt;P&gt;key techniques &amp;gt; Linking views together &amp;gt; intro&lt;/P&gt;

&lt;P&gt;Read that page and click 'next page'.   You basically have two main options and that second page will show you an example of both.&lt;/P&gt;

&lt;P&gt;1) use an HTML module to render HTML to match what you wanted SingleValue to do,  and also to make an actual link that contains $foo$ tokens.&lt;/P&gt;

&lt;P&gt;2) you can use a SubmitButton that then contains a Redirector module.  When the user clicks the button they'll be redirected. &lt;/P&gt;

&lt;P&gt;Some people still use SingleValue because it has that familiar mechanism of changing colors.  It's possible to make rangemap do these background-color tricks with the HTML too; in fact once you're used to how this works it's probably a fair bit easier.  I'll try and put an example in Sideview Utils soon.  You're not the first to ask for one.  If you beat me to it, please post.  &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;If you have any familiarity with CSS, it's not hard to cook up the background color stuff yourself.   Your HTML module will have something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;div class="$color$"&amp;gt;&amp;lt;a href="serverlist?server_type="$server_type$"&amp;gt;$errorCount$ errors&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;One more note:   if the values that you're putting into the link's URL may contain tricky characters you'll want to wrap use ValueSetter to make a big 'encodedArgs' field instead of referring to the raw values in the HTML module.  That piece would look like this, and hopefully it's clear what it's doing.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;module name="ValueSetter"&amp;gt;
  &amp;lt;param name="name"&amp;gt;encodedArgs&amp;lt;/param&amp;gt;
  &amp;lt;param name="urlEncodeKeys"&amp;gt;server_type,host&amp;lt;/param&amp;gt;
  &amp;lt;param name="value"&amp;gt;server_type=$server_type$&amp;amp;amp;host=$host$&amp;lt;/param&amp;gt;

  ... HTML module goes here, that uses $encodedArgs$ inside the href...

&amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jun 2011 17:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-use-Redirector-with-SingleValue/m-p/23019#M587</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-06-06T17:11:29Z</dc:date>
    </item>
  </channel>
</rss>

