Hi
I figured it out on my own! Wow, these are the things that will make it much better in my forms. I thought it was odd it was not part of the Design-tab to set it up actually.
I did not attach XSN as I am not sure what it is. File format probably, so you get the whole project. But I attached a picture that explaines where I went wrong, and how it is supposed to be.
What I left out was to attach the condition to the table properly, it was just dangling in the air.
Thanks for the code snippet :D
------------------------------------------
Rats, I cannot add the image.
Short recipe on how to do it right, from someone who just learned it:
Set up 2 formatting rules, EvenRows and OddRows, on the repeating table (MyTable, often called groupX auto. The icon is a open folder with blue ball on it)
EvenRows
Condition: MyTable=position() mod 2 =1
Rule type: Formatting
Formatting (put on a background color)
OddRows
Condition: MyTable=position() mod 2 = 0
Rule type: Formatting
Formatting (put on a different background color)
What I did wrong is that I set the condition to be
Condition: position() mod 2 =1
This is not enough.
When setting up the condition, choose "Select a field or group..." not "The expression".
Then select "is equal to". Next combo, select "Use a formula", then you get to validate the snippet in the formula builder. In the builder, you paste in the code snippet "position() mod 2 = 0" - part.
This is where I took a wrong turn. Hope this helps for others.