<?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 change the row colors based on the field value using CSS in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71026#M180759</link>
    <description>&lt;P&gt;I am getting the result data in the form of table from the view's SimpleResultsTable. In result data I have the fields Custid and EventId. For one CustomerID we can have more than one eventId. &lt;/P&gt;

&lt;H2&gt;CustID          EventID&lt;/H2&gt;

&lt;H2&gt;01               876&lt;/H2&gt;

&lt;H2&gt;01               545&lt;/H2&gt;

&lt;H2&gt;01               339&lt;/H2&gt;

&lt;H2&gt;02               876&lt;/H2&gt;

&lt;H2&gt;02               993&lt;/H2&gt;

&lt;H2&gt;03               378&lt;/H2&gt;

&lt;H2&gt;04               838&lt;/H2&gt;

&lt;P&gt;I want to make changes in $SPLUNK_HOME/etc/apps/&lt;MYAPP&gt;/appserver/static/my.css so that&lt;BR /&gt;
 1. Row color for each custid is different.&lt;BR /&gt;
 2. for each custid I want to make one row as&lt;/MYAPP&gt;&lt;/P&gt;

&lt;H2&gt;custid         EventID&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;            876
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;01              545&lt;/P&gt;

&lt;H2&gt;                339&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;           876
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;02             993&lt;/H2&gt;

&lt;H2&gt;03             378&lt;/H2&gt;

&lt;P&gt;The problem is that I know CSS but I don't know how to access value of CustID from simpleResultsTable and how to set row color on the basis of CustID value and group them together.&lt;BR /&gt;
I have tried to go thru documentation but I did not find the solution:( Please help me.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2012 00:28:55 GMT</pubDate>
    <dc:creator>disha</dc:creator>
    <dc:date>2012-09-26T00:28:55Z</dc:date>
    <item>
      <title>How to change the row colors based on the field value using CSS in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71026#M180759</link>
      <description>&lt;P&gt;I am getting the result data in the form of table from the view's SimpleResultsTable. In result data I have the fields Custid and EventId. For one CustomerID we can have more than one eventId. &lt;/P&gt;

&lt;H2&gt;CustID          EventID&lt;/H2&gt;

&lt;H2&gt;01               876&lt;/H2&gt;

&lt;H2&gt;01               545&lt;/H2&gt;

&lt;H2&gt;01               339&lt;/H2&gt;

&lt;H2&gt;02               876&lt;/H2&gt;

&lt;H2&gt;02               993&lt;/H2&gt;

&lt;H2&gt;03               378&lt;/H2&gt;

&lt;H2&gt;04               838&lt;/H2&gt;

&lt;P&gt;I want to make changes in $SPLUNK_HOME/etc/apps/&lt;MYAPP&gt;/appserver/static/my.css so that&lt;BR /&gt;
 1. Row color for each custid is different.&lt;BR /&gt;
 2. for each custid I want to make one row as&lt;/MYAPP&gt;&lt;/P&gt;

&lt;H2&gt;custid         EventID&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;            876
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;01              545&lt;/P&gt;

&lt;H2&gt;                339&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;           876
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;02             993&lt;/H2&gt;

&lt;H2&gt;03             378&lt;/H2&gt;

&lt;P&gt;The problem is that I know CSS but I don't know how to access value of CustID from simpleResultsTable and how to set row color on the basis of CustID value and group them together.&lt;BR /&gt;
I have tried to go thru documentation but I did not find the solution:( Please help me.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 00:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71026#M180759</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2012-09-26T00:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the row colors based on the field value using CSS in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71027#M180760</link>
      <description>&lt;P&gt;My editing for showing the table is corrupted but summary is that I want to group together in one row for each custid and need different color for each customer id.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 00:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71027#M180760</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2012-09-26T00:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the row colors based on the field value using CSS in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71028#M180761</link>
      <description>&lt;P&gt;I am able to figure it out. &lt;BR /&gt;
tr:nth-child(even) {&lt;BR /&gt;
    color: #000000;&lt;BR /&gt;
    background-color: #FFDEAD;&lt;BR /&gt;
}&lt;BR /&gt;
tr:nth-child(odd) {&lt;BR /&gt;
color : #000000;&lt;BR /&gt;
    background-color: #FFDEAD;&lt;BR /&gt;
}&lt;BR /&gt;
 Put this code in $Splunk_Home/etc/apps/myapp/appserver/static/name.css&lt;/P&gt;

&lt;P&gt;Also displaying the rows group togeher based on the field value, I achieved by Splunk search &lt;BR /&gt;
as | stats list(eventid) by custid.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2012 00:10:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-the-row-colors-based-on-the-field-value-using-CSS/m-p/71028#M180761</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2012-09-28T00:10:13Z</dc:date>
    </item>
  </channel>
</rss>

