Category : Technical Examples
Tables with alternating row colours.
The header row colour is fixed.
The colour of the first two data rows determines the alternating pattern.
This example shows
1) Row Colouring
The first row in the table is set to GREY and appears as GREY in the final document.
The repeating data starts from row two.
The first data row contains <<rr_items>>. The colour of this row will be used as the colour of the first data row in the final document.
The second data row contains <<$rownum>> and <<item>>. The colour of this row will be used as the colour of the second row in the final document.
If the row colours are different - then the remaining rows will alternate between these two colours.
2) Built-In Table Variables
<<$rownum>> is an example of a Docmosis built-in variable.
It is the number of the item in the repeating data set, so it doesn't include the header row, as you can see in this example. $rownum starts from 1.
TRY: <<$rowidx>>. This is another built-in variable that returns the number of the item in the repeating data set, starting from 0.
LEARN MORE: Download our Docmosis Quick Reference [PDF].