Row Coloration Syntax
S-Docs offers support to specify coloration on even and odd rows in subquery records.
The syntax, which is tableXXXsubRowEven and tableXXXsubRowOdd, is case-sensitive, and if not specified, will revert to the CSS that's specified by tableXXXRowEven and tableXXXRowOdd.
Coloration in LineItemsSOQL can be specified by <rowcoloration>tablerow</rowcoloration> and <rowcoloration>record</rowcoloration>.
If <rowcoloration>tablerow</rowcoloration> is specified, the table row class is changed from tableXXXRowOdd to tableXXXRowEven (and vice versa) every time a new table row (<tr>) is inserted. This is also true for table rows inserted by newrow="true", groupbysum, etc.
Example Table & Code
In this case, the table would look something like the following, given the sample code below:
<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><strong><rowcoloration>record</rowcoloration> w</strong></span></span><strong>ith newrow="true" </strong></span></span> <ul> <li><span style="color:#000000;"><span style="font-family:arial,helvetica,sans-serif;"><em>Row colors change every other record.</em></span></span></li> <li><span style="color:#000000;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,helvetica,sans-serif;"><em>The body of each chatter post/comment record is inserted in a new row after the the record's other columns.</em></span></span></span></li> </ul> <br /> <!-- ******************** START RELATED LIST SECTION UNIQUEID:876********************--> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3Etable.table876%20%7Bborder%3Asolid%20black%201px%3B%20border-collapse%3Acollapse%3B%20border-spacing%3A0px%3Bfont-family%3AArial%20Unicode%20MS%2CArial%2CHelvetica%2Csans-serif%3B%20font-size%3A10pt%3B%20width%3A100%25%20%7D%0A.table876header%20%7Btext-align%3Acenter%3Bfont-weight%3Abold%3Bborder%3Asolid%20black%201px%3Bcolor%3A%23FFFFFF%3Bbackground-color%3A%23000000%3B%7D%0A.table876footer%20%7Btext-align%3Aright%3Bfont-weight%3Abold%3Bborder%3Asolid%20black%201px%3B%20height%3A%2030px%7D%0A.table876subheader%20%7Btext-align%3Acenter%3Bfont-weight%3Abold%3Bborder%3Asolid%20black%201px%3Bcolor%3A%23FFFFFF%3Bbackground-color%3A%23000000%3B%7D%0A.table876RowEven%7Bborder%3Asolid%20black%201px%3Bbackground-color%3A%232ecc71%3B%7D%0A.table876RowOdd%7Bbackground-color%3A%23cdcdcd%3Bborder%3Asolid%20black%201px%3B%7D%0A.table876subRowEven%7Bborder%3Asolid%20black%201px%3Bbackground-color%3A%23f1c40f%3B%7D%0A.table876subRowOdd%7Bbackground-color%3A%238e44ad%3Bborder%3Asolid%20black%201px%3B%7D%0A.table876col0%7Bborder%3Asolid%20black%201px%3Btext-align%3Aleft%3B%7D%0A.table876col1%7Bborder%3Asolid%20black%201px%3Btext-align%3Aleft%3B%7D%0A.table876col2%7Bborder%3Asolid%20black%201px%3Btext-align%3Aleft%3B%7D%20%0A.table876col3%7Bborder%3Asolid%20black%201px%3Btext-align%3Aleft%3B%7D%0A.table876col4%7Bborder%3Asolid%20black%201px%3Btext-align%3Aleft%3B%7D%20%0A.table876col5%7Bborder%3Asolid%20black%201px%3Btext-align%3Aleft%3B%7D%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" /> <table class="table876"> <tbody><!--{{! <lineitemsSOQL><class>table876</class> <listname>feeds</listname> <soql> SELECT createdby.name, Body, createdby.phone, (SELECT createdby.name, createdby.phone,CommentBody FROM FeedComments) FROM FeedItem WHERE ParentId = '{{!ObjectID15}}' ORDER BY createddate desc</soql> <column header="Created By Name">createdby.name</column> <column header="Created By Phone">createdby.phone</column> <column newrow="true" colspan="2" type="text">body</column> <column header="(Subquery Header) Created By Name" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.name</column> <column header="(Subquery Header) Created By Phone" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.phone</column> <column newrow="true" colspan="2" type="text">sub.FeedComments.CommentBody</column> </lineitemsSOQL> }}--> </tbody> </table> <span style="font-family:arial,helvetica,sans-serif;"> </span><!-- ******************** END RELATED LIST SECTION UNIQUEID:876********************--> <div style="page-break-after: always"><span style="display: none;"> </span></div> <span style="color:#FF0000;"> </span><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"> </span><strong><span style="color:#FF0000;"></span></strong><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><strong><rowcoloration>record</rowcoloration> w</strong></span></span><strong><span style="color:#FF0000;">ithout newrow="true" </span></strong></span> <ul> <li><span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,helvetica,sans-serif;"><em>Row colors change every other record. </em></span></span></li> <li><span style="font-family:arial,helvetica,sans-serif;"><em>The body of each chatter post/comment record is inserted in the same row as the the record's other columns.</em></span></li> </ul> <br /> <!-- ******************** START RELATED LIST SECTION UNIQUEID:876********************--> <table class="table876"> <tbody><!--{{! <lineitemsSOQL><class>table876</class> <listname>feeds</listname> <soql> SELECT createdby.name, Body, createdby.phone, (SELECT createdby.name, createdby.phone,CommentBody FROM FeedComments) FROM FeedItem WHERE ParentId = '{{!ObjectID15}}' ORDER BY createddate desc</soql> <column header="Created By Name">createdby.name</column> <column header="Created By Phone">createdby.phone</column> <column header="Body" type="text">body</column> <column header="(Subquery Header) Created By Name" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.name</column> <column header="(Subquery Header) Created By Phone" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.phone</column> <column header="(Subquery Header) Comments" type="text">sub.FeedComments.CommentBody</column> </lineitemsSOQL> }}--> </tbody> </table> <span style="font-family:arial,helvetica,sans-serif;"> <!-- ******************** END RELATED LIST SECTION UNIQUEID:876********************--></span><br /> <br /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" /> <div style="page-break-after: always"><span style="display: none;"> </span></div> <span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><strong><rowcoloration>tablerow</rowcoloration> w</strong></span></span></span></span><strong>ith newrow="true"</strong></span></span> <ul> <li><span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,helvetica,sans-serif;"><em>Row colors change every other table row. </em></span></span></li> <li><span style="font-family:arial,helvetica,sans-serif;"><em>The body of each chatter post/comment record is inserted in a new row after the the record's other columns.</em></span></li> </ul> <br /> <!-- ******************** START RELATED LIST SECTION UNIQUEID:876********************--> <table class="table876"> <tbody><!--{{! <lineitemsSOQL><class>table876</class> <listname>feeds</listname> <rowcoloration>tablerow</rowcoloration> <soql> SELECT createdby.name, Body, createdby.phone, (SELECT createdby.name, createdby.phone,CommentBody FROM FeedComments) FROM FeedItem WHERE ParentId = '{{!ObjectID15}}' ORDER BY createddate desc</soql> <column header="Created By Name">createdby.name</column> <column header="Created By Phone">createdby.phone</column> <column newrow="true" colspan="2" type="text">body</column> <column header="(Subquery Header) Created By Name" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.name</column> <column header="(Subquery Header) Created By Phone" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.phone</column> <column newrow="true" colspan="2" type="text">sub.FeedComments.CommentBody</column> </lineitemsSOQL> }}--> </tbody> </table> <span style="font-family:arial,helvetica,sans-serif;"> </span><!-- ******************** END RELATED LIST SECTION UNIQUEID:876********************--> <div style="page-break-after: always"><span style="display: none;"> </span></div> <span style="color:#FF0000;"> </span><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"> </span><strong><span style="color:#FF0000;"></span></strong><span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><span style="font-family:arial,helvetica,sans-serif;"><span style="color:#FF0000;"><strong><rowcoloration>tablerow</rowcoloration> w</strong></span></span></span></span></span><strong><span style="color:#FF0000;">ithout newrow="true"</span></strong></span> <ul> <li><span style="font-family:arial,helvetica,sans-serif;"></span><span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,helvetica,sans-serif;"><em>Row colors change every other table row. </em></span></span></span></li> <li><span style="font-family:arial,helvetica,sans-serif;"><em>The body of each chatter post/comment record is inserted in the same row as the the record's other columns.</em></span></li> </ul> <br /> <!-- ******************** START RELATED LIST SECTION UNIQUEID:876********************--> <table class="table876"> <tbody><!--{{! <lineitemsSOQL><class>table876</class> <listname>feeds</listname> <rowcoloration>tablerow</rowcoloration> <soql> SELECT createdby.name, Body, createdby.phone, (SELECT createdby.name, createdby.phone,CommentBody FROM FeedComments) FROM FeedItem WHERE ParentId = '{{!ObjectID15}}' ORDER BY createddate desc</soql> <column header="Created By Name">createdby.name</column> <column header="Created By Phone">createdby.phone</column> <column header="Body" type="text">body</column> <column header="(Subquery Header) Created By Name" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.name</column> <column header="(Subquery Header) Created By Phone" prefix="(Subquery Column) " nullprefix="(Subquery Column) ">sub.FeedComments.createdby.phone</column> <column header="(Subquery Header) Comments" type="text">sub.FeedComments.CommentBody</column> </lineitemsSOQL> }}--> </tbody> </table> <span style="font-family:arial,helvetica,sans-serif;"> <!-- ******************** END RELATED LIST SECTION UNIQUEID:876********************--></span><br /> <br /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" />
If <rowcoloration>record</rowcoloration> is specified, the table row class changes from tableXXXRowEven to tableXXXRowOdd (and vice versa) upon iterating through all of the columns for the current record, regardless of how many table rows (<tr>) were inserted during that time.
If neither are specified, the default will be <rowcoloration>record</rowcoloration>.
Tags: Formatting, Related List, SOQL Query