<?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: Renaming the 'range' field from rangemap in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117347#M31268</link>
    <description>&lt;P&gt;thank you!&lt;/P&gt;</description>
    <pubDate>Sun, 12 Jul 2015 03:17:34 GMT</pubDate>
    <dc:creator>zd00191</dc:creator>
    <dc:date>2015-07-12T03:17:34Z</dc:date>
    <item>
      <title>Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117342#M31263</link>
      <description>&lt;P&gt;I have a search that reads a value 0-10. I use a rangemap command to insert custom icons in toa table based on the what that value is. If it is 0-50, it is a red x. If it is 51-75, it is a yellow caution. If it is 76-100, it is a green check. I have a table that contains two columns: Application and range which is automatically created by the rangemap command. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag="*" LocID="-7" SbuID="-7" | dedup tag |eval x=substr(ResponseDisplay,1,3) |stats values(x) AS "Application_Response" by tag |rangemap field=Application_Response severe=0-50 elevated=51-75 low=76-100 default=severe | table tag range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I rename the 'range' column to 'Health Status'?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2015 20:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117342#M31263</guid>
      <dc:creator>zd00191</dc:creator>
      <dc:date>2015-07-11T20:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117343#M31264</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rename range AS "Health Status"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Jul 2015 21:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117343#M31264</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-11T21:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117344#M31265</link>
      <description>&lt;P&gt;I have custom icons going into that table column. If I rename it, the icons do show up. Do I needto edit the .css or.js file?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2015 01:15:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117344#M31265</guid>
      <dc:creator>zd00191</dc:creator>
      <dc:date>2015-07-12T01:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117345#M31266</link>
      <description>&lt;P&gt;the icons do not show up sorry&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2015 01:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117345#M31266</guid>
      <dc:creator>zd00191</dc:creator>
      <dc:date>2015-07-12T01:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117346#M31267</link>
      <description>&lt;P&gt;Assuming your JS refers to the column by name then yes, you will need to update that accordingly.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2015 03:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117346#M31267</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-07-12T03:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117347#M31268</link>
      <description>&lt;P&gt;thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2015 03:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117347#M31268</guid>
      <dc:creator>zd00191</dc:creator>
      <dc:date>2015-07-12T03:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117348#M31269</link>
      <description>&lt;P&gt;Did the rename work?  Which place in js do we need to change? I added label along with range.  But it's not changed.  Can you please help? &lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 12:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117348#M31269</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2017-05-22T12:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117349#M31270</link>
      <description>&lt;P&gt;There are several things that need to be done in order to rename the range field:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Amend the JS to reference the new name of the field, for example Health_Status.
Make the following changes in JS:&lt;/LI&gt;
&lt;/OL&gt;

&lt;UL&gt;
&lt;LI&gt; &lt;STRONG&gt;return cell.field === 'Heath_Status'&lt;/STRONG&gt; ;&lt;/LI&gt;
&lt;LI&gt; &lt;STRONG&gt;$td.addClass('icon').html(_.template('&lt;I&gt;&lt;/I&gt;', {&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Health_Status: cell.value&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Make changes in your search:&lt;/P&gt;

&lt;P&gt;tag="*" LocID="-7" SbuID="-7" | dedup tag |eval x=substr(ResponseDisplay,1,3) |stats values(x) AS "Application_Response" by tag |rangemap field=Application_Response severe=0-50 elevated=51-75 low=76-100 default=severe | eval Health_Status=range&lt;BR /&gt;
| table tag Health_Status&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117349#M31270</guid>
      <dc:creator>aina_sloan</dc:creator>
      <dc:date>2020-09-29T15:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117350#M31271</link>
      <description>&lt;P&gt;@aina_sloan, can we do this without making any change to JS script?&lt;/P&gt;

&lt;P&gt;Also when I create two dashboard panel that use rangemap, one shows the visualisation and other doesn't.  Any chance I could fix this as well.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Mar 2018 21:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117350#M31271</guid>
      <dc:creator>pranav_agile</dc:creator>
      <dc:date>2018-03-10T21:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117351#M31272</link>
      <description>&lt;P&gt;Hi @pranav_agile. The default return cell.field  is range, i.e, return cell.field === 'range' , if this is the name of the field in your final result in your table then you do not need to change the field  name in JS. &lt;/P&gt;

&lt;P&gt;When you create two tables you need to specify table id for each of the dashboard panels. For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;row&amp;gt;
&amp;lt;panel&amp;gt;
&amp;lt;table id="table1"&amp;gt;
  &amp;lt;search&amp;gt;
     &amp;lt;query&amp;gt; your query&amp;lt;/query&amp;gt;
     &amp;lt;earliest&amp;gt;-7d&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
   &amp;lt;/search&amp;gt;
&amp;lt;option name="name"&amp;gt;value&amp;lt;/option&amp;gt;
&amp;lt;/format&amp;gt;
&amp;lt;/table&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 id="table2"&amp;gt;
       &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt; your query&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;-7d&amp;lt;/earliest&amp;gt;
       &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
     &amp;lt;/search&amp;gt;
    &amp;lt;option name="name"&amp;gt;value&amp;lt;/option&amp;gt;
 &amp;lt;/format&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&amp;lt;/row&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is were we are getting an issue with not editing the JS. Because the custom script only has configuration for one table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mvc.Components.get('table1').getVisualization(function(tableView){
 // Register custom cell renderer
 tableView.table.addCellRenderer(new RangeMapIconRenderer());
 // Force the table to re-render
 tableView.table.render();
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We need to copy this part of the script for our table id="table2". Meaning that we will have something like this at the bottom of our script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; mvc.Components.get('table1').getVisualization(function(tableView){
     // Register custom cell renderer
     tableView.table.addCellRenderer(new RangeMapIconRenderer());
     // Force the table to re-render
     tableView.table.render());
           });
    mvc.Components.get('table2').getVisualization(function(tableView){
     // Register custom cell renderer
     tableView.table.addCellRenderer(new RangeMapIconRenderer());
     // Force the table to re-render
     tableView.table.render());
         });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 15:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/117351#M31272</guid>
      <dc:creator>aina_sloan</dc:creator>
      <dc:date>2018-03-12T15:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming the 'range' field from rangemap</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/521366#M146919</link>
      <description>&lt;P&gt;This does rename the column of the output, but then the icons do not load.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 19:44:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Renaming-the-range-field-from-rangemap/m-p/521366#M146919</guid>
      <dc:creator>joesrepsolc</dc:creator>
      <dc:date>2020-09-24T19:44:15Z</dc:date>
    </item>
  </channel>
</rss>

