<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Change color of repeating section based on count</title><link>https://www.infopathdev.com:443/forums/thread/69574.aspx</link><pubDate>Tue, 23 Aug 2011 18:37:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69574</guid><dc:creator>Lockdown</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69574.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=69574</wfw:commentRss><description>&lt;p&gt;Here is what you gotta do:&lt;/p&gt;
&lt;p&gt;Add&amp;nbsp;2 conditions to the conditional formatting section of your repeating section. Use these two equations. The Mod operator (mod, %) really just gives you a remainder as an output. &lt;/p&gt;
&lt;p&gt;5 mod 2 = 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5/2 has a remainder of 1&lt;/p&gt;
&lt;p&gt;6 mod 3 = 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6/3 has a remainder of 0&lt;/p&gt;
&lt;p&gt;Use these two equations.&lt;/p&gt;
&lt;p&gt;1. number(position() mod 2) = 0 - then set the shading to what ever color you want.&lt;/p&gt;
&lt;p&gt;2. number(position() mod 2) =&amp;nbsp;1 - then set the shading to what ever color you want.&lt;/p&gt;</description></item><item><title>Re: Change color of repeating section based on count</title><link>https://www.infopathdev.com:443/forums/thread/69570.aspx</link><pubDate>Tue, 23 Aug 2011 18:08:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69570</guid><dc:creator>Big E</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69570.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=69570</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Could you give me an example of this?&amp;nbsp; Never used that before.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Change color of repeating section based on count</title><link>https://www.infopathdev.com:443/forums/thread/69472.aspx</link><pubDate>Sun, 21 Aug 2011 19:39:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69472</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69472.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=69472</wfw:commentRss><description>&lt;p&gt;How about just using the xpath &amp;quot;mod&amp;quot; operator? Something like number(position() mod 2) will return 0 or 1 and then you can do conditional formatting on that if it&amp;#39;s&amp;nbsp;0.&lt;/p&gt;</description></item><item><title>Change color of repeating section based on count</title><link>https://www.infopathdev.com:443/forums/thread/69438.aspx</link><pubDate>Fri, 19 Aug 2011 14:25:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69438</guid><dc:creator>Big E</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69438.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=69438</wfw:commentRss><description>&lt;p&gt;I have a project managment form that I built that has a repeating task section with a repeating subtask section underneath.&amp;nbsp; I use the count function to return a number for each task item.&amp;nbsp; All is working fine.&amp;nbsp; What I would like to do is change the color of the top level repeating section which in this case is &amp;quot;Task&amp;quot; based on the row count.&lt;/p&gt;
&lt;p&gt;For example, task 1 = blue, task 2 = red, task 3 = blue, task 4 = red.&amp;nbsp; Pretty much, same color for every other insert.&amp;nbsp; I can do this by adding a condition based on the count.&amp;nbsp; However, this is a terrible way of getting this to work.&amp;nbsp; Not efficient at all.&lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;</description></item></channel></rss>