<?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 color a table cell whose column name is dynamic in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168941#M48203</link>
    <description>&lt;P&gt;I guess you will the same column number even if you have different field name.. &lt;BR /&gt;
If that is right...... Then you can get the column position and decide your color...&lt;/P&gt;

&lt;P&gt;$td.parent().children().index($td[0])  == coloumnPos&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Get the parent Element (i.e )&lt;/LI&gt;
&lt;LI&gt;get the list of childrens (i.e. ss)&lt;/LI&gt;
&lt;LI&gt;find the position of the current td and compare it with your column position and do the rest with coloring.... &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Note : coloumn count starts from Zero ...i.e zero for 1st column&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2015 08:41:09 GMT</pubDate>
    <dc:creator>paramagurukarth</dc:creator>
    <dc:date>2015-06-22T08:41:09Z</dc:date>
    <item>
      <title>How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168938#M48200</link>
      <description>&lt;P&gt;I want to color cells of a column name which is in dynamic _time format. Below is my format if we select last 3 days from timepicker.&lt;/P&gt;

&lt;P&gt;Channel 22-Jun-15   21-Jun-15   20-Jun-15   19-Jun-15&lt;BR /&gt;
BBC Sport   6   3   7   9&lt;BR /&gt;
Discovery   2   6   4   3&lt;/P&gt;

&lt;P&gt;I want to color all the dynamic _time column cells based on the numbers that cell contains. In Splunk Dashboard Examples 6.x, the method is mentioned only for a static column name.&lt;/P&gt;

&lt;P&gt;Can it be done if the column name is dynamic. Please help.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 07:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168938#M48200</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2015-06-22T07:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168939#M48201</link>
      <description>&lt;P&gt;You can do it using &lt;STRONG&gt;splunk/etc/apps/MyApplication/appserver/static/application.js...&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if(Splunk.util.getCurrentView() == "yourViewName" &amp;amp;&amp;amp; Splunk.Module.SimpleResultsTable){
    Splunk.Module.SimpleResultsTable = $.klass(Splunk.Module.SimpleResultsTable, {
        onResultsRendered: function() {
            var container = this.container;
            .
            .
            . **Select and color your element using jQuery**
            .
            .
            .
        }
    });
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Above example is to customize SimpleResultsTable....&lt;BR /&gt;
*container is the parent div element of your table view&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 07:23:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168939#M48201</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T07:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168940#M48202</link>
      <description>&lt;P&gt;Hi paramagurukarthikeyan. Appreciate you answer but couldn't understand the entire part. It would be great if you could explain me a bit more and tell me what exactly will be my return field.&lt;/P&gt;

&lt;P&gt;ex -&lt;BR /&gt;&lt;BR /&gt;
    require([&lt;BR /&gt;
        'underscore',&lt;BR /&gt;
        'jquery',&lt;BR /&gt;
        'splunkjs/mvc',&lt;BR /&gt;
        'splunkjs/mvc/tableview',&lt;BR /&gt;
        'splunkjs/mvc/simplexml/ready!'&lt;BR /&gt;
    ], function(_, $, mvc, TableView) {&lt;BR /&gt;
         // Row Coloring Example with custom, client-side range interpretation&lt;BR /&gt;
        var CustomRangeRenderer = TableView.BaseCellRenderer.extend({&lt;BR /&gt;
            canRender: function(cell) {&lt;BR /&gt;
                // Enable this custom cell renderer for both the active_hist_searches and the active_realtime_searches field&lt;BR /&gt;
                return _(['active_hist_searches', 'active_realtime_searches']).contains(cell.field);&lt;BR /&gt;
            },&lt;BR /&gt;
            render: function($td, cell) {&lt;BR /&gt;
                // Add a class to the cell based on the returned value&lt;BR /&gt;
                var value = parseFloat(cell.value);&lt;BR /&gt;
                // Apply interpretation for number of historical searches&lt;BR /&gt;
                if (cell.field === 'active_hist_searches') {&lt;BR /&gt;
                    if (value &amp;gt; 2) {&lt;BR /&gt;
                        $td.addClass('range-cell').addClass('range-severe');&lt;BR /&gt;
                    }&lt;BR /&gt;
                    else if (value &amp;gt; 1) {&lt;BR /&gt;
                        $td.addClass('range-cell').addClass('range-elevated');&lt;BR /&gt;
                    }&lt;BR /&gt;
                    else if (value &amp;gt; 0) {&lt;BR /&gt;
                        $td.addClass('range-cell').addClass('range-low');&lt;BR /&gt;
                    }&lt;BR /&gt;
                }&lt;BR /&gt;
                // Apply interpretation for number of realtime searches&lt;BR /&gt;
                if (cell.field === 'active_realtime_searches') {&lt;BR /&gt;
                    if (value &amp;gt; 1) {&lt;BR /&gt;
                        $td.addClass('range-cell').addClass('range-severe');&lt;BR /&gt;
                    }&lt;BR /&gt;
                }&lt;BR /&gt;
                // Update the cell content&lt;BR /&gt;
                $td.text(value.toFixed(2)).addClass('numeric');&lt;BR /&gt;
            }&lt;BR /&gt;
        });&lt;BR /&gt;
        mvc.Components.get('highlight').getVisualization(function(tableView) {&lt;BR /&gt;
            // Add custom cell renderer&lt;BR /&gt;
            tableView.table.addCellRenderer(new CustomRangeRenderer());&lt;BR /&gt;
            // tableView.on('rendered', function() {&lt;BR /&gt;
                // Apply class of the cells to the parent row in order to color the whole row&lt;BR /&gt;
               // tableView.$el.find('td.range-cell').each(function() {&lt;BR /&gt;
               //     $(this).addClass(this.className);&lt;BR /&gt;
               // });&lt;BR /&gt;
            //});&lt;BR /&gt;
            // Force the table to re-render&lt;BR /&gt;
            tableView.table.render();&lt;BR /&gt;
        });&lt;BR /&gt;
    });&lt;/P&gt;

&lt;P&gt;In the above example, the return fields are 'active_hist_searches' &amp;amp; 'active_realtime_searches'. Smilarly for my case as its a dynamic _time field, what should i write inside return[]?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168940#M48202</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2020-09-28T20:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168941#M48203</link>
      <description>&lt;P&gt;I guess you will the same column number even if you have different field name.. &lt;BR /&gt;
If that is right...... Then you can get the column position and decide your color...&lt;/P&gt;

&lt;P&gt;$td.parent().children().index($td[0])  == coloumnPos&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Get the parent Element (i.e )&lt;/LI&gt;
&lt;LI&gt;get the list of childrens (i.e. ss)&lt;/LI&gt;
&lt;LI&gt;find the position of the current td and compare it with your column position and do the rest with coloring.... &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Note : coloumn count starts from Zero ...i.e zero for 1st column&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 08:41:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168941#M48203</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T08:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168942#M48204</link>
      <description>&lt;P&gt;Hi paramagurukarthikeyan. If you could just give one example to demonstrate the solution you suggested, it would be great.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 08:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168942#M48204</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2015-06-22T08:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168943#M48205</link>
      <description>&lt;P&gt;Below is my query :&lt;/P&gt;

&lt;P&gt;sourcetype=shmapplogs "getMS3SAS ended for - deviceId" | bucket span=1d _time | stats count by _time channelId | sort count desc | lookup youview_channels.csv service_id_truncated AS channelId OUTPUT channel_name_letter | streamstats count AS position by _time | fields channel_name_letter position _time | convert timeformat="%d-%b-%Y" ctime(_time) As Time | chart max(position) over channel_name_letter by Time&lt;/P&gt;

&lt;P&gt;I want to color the cells belong to 'Time' field.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:19:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168943#M48205</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2020-09-28T20:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168944#M48206</link>
      <description>&lt;P&gt;Instead, can you Please show me your results screen shot..... &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 09:10:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168944#M48206</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T09:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168945#M48207</link>
      <description>&lt;P&gt;i cannot post screenshots here. But in my question itself i have specified the format of my results. Please have a look.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 09:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168945#M48207</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2015-06-22T09:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168946#M48208</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/simplexml/ready!'
], function(, $, mvc, TableView) {
    // Row Coloring Example with custom, client-side range interpretation
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            // Enable this custom cell renderer for both the active_hist_searches and the active_realtime_searches field
            return (['active_hist_searches', 'active_realtime_searches']).contains(cell.field);
        },
        render: function($td, cell) {
            // Add a class to the cell based on the returned value
            var value = parseFloat(cell.value);
            // Apply interpretation for number of historical searches
            var tdPosition = $td.parent().children().index($td[0]);
            //To customize First Column based on its value
            if (tdPosition == 0) {
                if (value &amp;gt; 2) {
                    $td.addClass('range-cell').addClass('range-severe');
                } else if (value &amp;gt; 1) {
                    $td.addClass('range-cell').addClass('range-elevated');
                } else if (value &amp;gt; 0) {
                    $td.addClass('range-cell').addClass('range-low');
                }
            }
            // Apply interpretation for number of realtime searches
            //To customize Second Column based on its value
            if (tdPosition == 1) {
                if (value &amp;gt; 1) {
                    $td.addClass('range-cell').addClass('range-severe');
                }
            }
            // Update the cell content
            $td.text(value.toFixed(2)).addClass('numeric');
        }
    });
    mvc.Components.get('highlight').getVisualization(function(tableView) {
        // Add custom cell renderer
        tableView.table.addCellRenderer(new CustomRangeRenderer());
        // tableView.on('rendered', function() {
        // Apply class of the cells to the parent row in order to color the whole row
        // tableView.$el.find('td.range-cell').each(function() {
        // $(this).addClass(this.className);
        // });
        //});
        // Force the table to re-render
        tableView.table.render();
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jun 2015 09:19:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168946#M48208</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T09:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168947#M48209</link>
      <description>&lt;P&gt;can i use below to give same condition for all the columns after 1st column.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;if (tdPosition &amp;gt; 0) {&lt;BR /&gt;
                 if (value &amp;gt; 2) {&lt;BR /&gt;
                     $td.addClass('range-cell').addClass('range-severe');&lt;BR /&gt;
                 } else if (value &amp;gt; 1) {&lt;BR /&gt;
                     $td.addClass('range-cell').addClass('range-elevated');&lt;BR /&gt;
                 } else if (value &amp;gt; 0) {&lt;BR /&gt;
                     $td.addClass('range-cell').addClass('range-low');&lt;BR /&gt;
                 }&lt;BR /&gt;
             }&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Also do i need return field if i use tdposition?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 09:38:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168947#M48209</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2015-06-22T09:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168948#M48210</link>
      <description>&lt;P&gt;yes you can... to confirm that just put a console.log(tdposition + value)   before that condition &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 09:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168948#M48210</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T09:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168949#M48211</link>
      <description>&lt;P&gt;okay.. Thank you.. one more question.. &lt;/P&gt;

&lt;P&gt;return (['active_hist_searches', 'active_realtime_searches']).contains(cell.field);&lt;BR /&gt;
         },&lt;/P&gt;

&lt;P&gt;The names mentioned in return[] contains the field names whose cells i want to color. what should i mention in return field for my case as the column names are dynamic?&lt;/P&gt;

&lt;P&gt;my first field name is "Channel" and it's static. After that only dynamic _time column names will come.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:19:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168949#M48211</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2020-09-28T20:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168950#M48212</link>
      <description>&lt;P&gt;send me what you are getting a a value for cell&lt;BR /&gt;
Or&lt;BR /&gt;
Before sending that just try &lt;CODE&gt;return true;&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 09:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168950#M48212</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T09:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168951#M48213</link>
      <description>&lt;P&gt;Below will be sample of my results if i chose 3 days from timepicker&lt;/P&gt;

&lt;P&gt;Channel 22-Jun-15 21-Jun-15 20-Jun-15 19-Jun-15&lt;BR /&gt;
BBC Sport 6 3 7 9&lt;BR /&gt;
Discovery 2 6 4 3&lt;/P&gt;

&lt;P&gt;My query:&lt;BR /&gt;
sourcetype=shmapplogs "getMS3SAS ended for - deviceId" | bucket span=1d _time | stats count by _time channelId | sort count desc | lookup youview_channels.csv service_id_truncated AS channelId OUTPUT channel_name_letter | streamstats count AS position by _time | fields channel_name_letter position _time | convert timeformat="%d-%b-%Y" ctime(_time) As Time | chart max(position) over channel_name_letter by Time&lt;/P&gt;

&lt;P&gt;i want to color all '_time' columns from the above format based on the numbers each column contains.&lt;/P&gt;

&lt;P&gt;Channel will be the static column and rest all will be dynamic. I want coloring only for dynamic columns.&lt;/P&gt;

&lt;P&gt;so what should i write for return[()].contains(cell.field)?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168951#M48213</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2020-09-28T20:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168952#M48214</link>
      <description>&lt;P&gt;If you see the tableview.js inside &lt;STRONG&gt;C:\Program Files\Splunk\share\splunk\search_mrsparkle\exposed\js\build\splunkjs\mvc&lt;/STRONG&gt;&lt;BR /&gt;
it will cal render only if the canRender returns true&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;if (cellRenderer instanceof BaseCellRenderer) {
                        if (**cellRenderer.canRender(cellData)**) {
                            cellRenderer.setup($td, cellData);
                            **cellRenderer.render($td, cellData);**
                            renderedCell.cellData = cellData;
                            renderedCell.cellRenderer = cellRenderer;
                            break;
                        }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You must identify you column number in canRender too or just return true; from canRender... and check what is happening..........&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 10:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168952#M48214</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T10:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168953#M48215</link>
      <description>&lt;P&gt;Inside C:\Program Files\Splunk\share\splunk\search_mrsparkle\exposed\js\build\splunkjs\mvc\tableview.js, the render method will be called only if canRender method returns true for that cell...&lt;/P&gt;

&lt;P&gt;if (cellRenderer instanceof BaseCellRenderer) {&lt;BR /&gt;
                        if &lt;STRONG&gt;(cellRenderer.canRender(cellData)) {&lt;/STRONG&gt;&lt;BR /&gt;
                            cellRenderer.setup($td, cellData);&lt;BR /&gt;
                            &lt;STRONG&gt;cellRenderer.render($td, cellData);&lt;/STRONG&gt;&lt;BR /&gt;
                            renderedCell.cellData = cellData;&lt;BR /&gt;
                            renderedCell.cellRenderer = cellRenderer;&lt;BR /&gt;
                            break;&lt;BR /&gt;
                        }&lt;/P&gt;

&lt;P&gt;So you have to identify the required cell in candRender too...&lt;/P&gt;

&lt;P&gt;But before investing time in that just return &lt;CODE&gt;true&lt;/CODE&gt; from candRender method and see whether it work or not...&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2015 10:20:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168953#M48215</guid>
      <dc:creator>paramagurukarth</dc:creator>
      <dc:date>2015-06-22T10:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168954#M48216</link>
      <description>&lt;P&gt;Hi paramagurukarthikeyan.&lt;BR /&gt;
Below is the script i am using right now. The bolded parts (i.e parts with **) has some problems. The table is showing empty i.e. only the column names are showing without any values. I think there is some problem with updating the cell content. Can you please help?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    'underscore',
    'jquery',
    'splunkjs/mvc',
    'splunkjs/mvc/tableview',
    'splunkjs/mvc/simplexml/ready!'
], function(_, $, mvc, TableView) {
     // Row Coloring Example with custom, client-side range interpretation
    var CustomRangeRenderer = TableView.BaseCellRenderer.extend({
        canRender: function(cell) {
            // Enable this custom cell renderer for both the active_hist_searches and the active_realtime_searches field
            **return true;**
        },
        render: function($td, cell) {
            // Add a class to the cell based on the returned value
            // Apply interpretation for number of historical searches
                var tdPosition = $td.parent().children().index($td[0]);
                **var value = cell.value;**
            if (tdPosition &amp;gt; 0) {
                    **var value = parseFloat(value);**
                if ((value &amp;gt; 0) &amp;amp;&amp;amp; (value &amp;lt;= 50)) {
                    $td.addClass('range-cell').addClass('range-severe');
                }
                else if ((value &amp;gt; 50) &amp;amp;&amp;amp; (value &amp;lt;= 100)) {
                    $td.addClass('range-cell').addClass('range-elevated');
                }
                else if ((value &amp;gt; 100) &amp;amp;&amp;amp; (value &amp;lt;= 150)) {
                    $td.addClass('range-cell').addClass('range-low');
                }
                    else {
                        $td.addClass('range-cell').addClass('range-empty');
                    }

            }
            // Update the cell content
                **$td.text(value).addClass('numeric');**
        }
    });
    mvc.Components.get('rettable').getVisualization(function(tableView) {
        // Add custom cell renderer
        tableView.table.addCellRenderer(new CustomRangeRenderer());
        // tableView.on('rendered', function() {
            // Apply class of the cells to the parent row in order to color the whole row
           // tableView.$el.find('td.range-cell').each(function() {
           //     $(this).addClass(this.className);
           // });
        //});
        // Force the table to re-render
        tableView.table.render();
    });
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jun 2015 11:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168954#M48216</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2015-06-23T11:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to color a table cell whose column name is dynamic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168955#M48217</link>
      <description>&lt;P&gt;In the below link i have specified everything very clearly. Please have a look.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/249570/content-not-showing-in-the-table.html"&gt;http://answers.splunk.com/answers/249570/content-not-showing-in-the-table.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2015 11:20:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-color-a-table-cell-whose-column-name-is-dynamic/m-p/168955#M48217</guid>
      <dc:creator>kabiraj</dc:creator>
      <dc:date>2015-06-23T11:20:52Z</dc:date>
    </item>
  </channel>
</rss>

