<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Change value of a field in a Repeating Section based on number of occurances of the section</title><link>https://www.infopathdev.com:443/forums/thread/42237.aspx</link><pubDate>Fri, 29 May 2009 05:07:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42237</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42237.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42237</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Delete all the rows in the repeating table and insert the new item then the both will work. Try out once.&lt;/p&gt;</description></item><item><title>Re: Change value of a field in a Repeating Section based on number of occurances of the section</title><link>https://www.infopathdev.com:443/forums/thread/42236.aspx</link><pubDate>Fri, 29 May 2009 04:56:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42236</guid><dc:creator>lukeksmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42236.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42236</wfw:commentRss><description>&lt;p&gt;swathip,&lt;/p&gt;
&lt;p&gt;Thanks for the reply!&amp;nbsp; &lt;/p&gt;
&lt;p&gt;When I complete just step 1 of the directions you posted, &amp;quot;Former Expiration Date&amp;quot; in the first occurance of the repeating section is populated with the value of &amp;quot;Expiration Date&amp;quot;&lt;/p&gt;
&lt;p&gt;When I complete just step 2, &amp;quot;Former Expiration Date&amp;quot; in the second occurance is populated with the value of the preceding section&amp;#39;s &amp;quot;New Expiration Date&amp;quot;&lt;/p&gt;
&lt;p&gt;When I complete both steps,&amp;nbsp; the &amp;quot;Former Expiration Date&amp;quot; is not given a value when I insert the first section.&amp;nbsp; But, &amp;quot;Former Expiration Date&amp;quot; in the second occurance is populated with the value of the preceding section&amp;#39;s &amp;quot;New Expiration Date&amp;quot;&lt;/p&gt;
&lt;p&gt;To make&amp;nbsp;this short, step 1 works and step 2 works, but steps&amp;nbsp;1 and 2 do not work together.&amp;nbsp; It seems&amp;nbsp;that&amp;nbsp;the &amp;quot;set a field&amp;#39;s value&amp;quot;&amp;nbsp;action&amp;nbsp;does not work&amp;nbsp;on a field in a repeating section that&amp;nbsp;has a default value set.&lt;/p&gt;
&lt;p&gt;Can anyone confirm this or offer a workaround?&lt;/p&gt;</description></item><item><title>Re: Change value of a field in a Repeating Section based on number of occurances of the section</title><link>https://www.infopathdev.com:443/forums/thread/42191.aspx</link><pubDate>Thu, 28 May 2009 05:46:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42191</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42191.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42191</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can get it using Rules. Follow the below steps.&lt;/p&gt;
&lt;p&gt;1. GO to repeating table properties. Add the rule1 as &lt;/p&gt;
&lt;p&gt;If count(/my:myFields/my:group1/my:group2) = 1 then set the Former_Extension_Date = Extension_Date&lt;/p&gt;
&lt;p&gt;2. Add the default value for Former_Expiration_Date as&lt;/p&gt;
&lt;p&gt;current()/../preceding-sibling::my:repeatinggroup[1]/my: New_Extention_Date&lt;/p&gt;</description></item><item><title>Change value of a field in a Repeating Section based on number of occurances of the section</title><link>https://www.infopathdev.com:443/forums/thread/42183.aspx</link><pubDate>Wed, 27 May 2009 20:43:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42183</guid><dc:creator>lukeksmith</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42183.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=42183</wfw:commentRss><description>&lt;p&gt;I am designing a contract form.&amp;nbsp; It works well if I enter all the information manually.&amp;nbsp; What I want to do is automate some fields.&lt;/p&gt;
&lt;p&gt;I have a&amp;nbsp;date field named &amp;quot;Expiration_Date.&amp;quot;&lt;/p&gt;
&lt;p&gt;Under the Expiration date field I have a Repeating Section (called Extension) with two other Date fields: &amp;quot;Former_Expiration_Date&amp;quot;, and &amp;quot;New_Expiration_Date.&amp;quot;&lt;/p&gt;
&lt;p&gt;The purpose of this repeating section is&amp;nbsp;to have the user insert the section if an extension is needed.&amp;nbsp; There can be multiple extensions, hence the use of a repeating section.&lt;/p&gt;
&lt;p&gt;When the first extension is inserted I want the &amp;quot;Former Expiration Date&amp;quot; field&amp;#39;s value to be set to match the value of the &amp;quot;Expiration Date&amp;quot; field.&amp;nbsp; Now if I add a second extension I want the second occurance of the Repeating Section&amp;#39;s &amp;quot;Former Expiration Date&amp;quot; to be set from the value of the first occurance&amp;#39;s &amp;quot;New_Expiration_Date&amp;quot; instead of the original &amp;quot;Expiration_Date&amp;quot;, and the third occurance to be populated from the second and so on...&lt;/p&gt;
&lt;p&gt;I have tried to accomplish this using rules, but it doesn&amp;#39;t seem to work.&lt;/p&gt;
&lt;p&gt;I created a rule in the &amp;quot;Extension&amp;quot; repeating section.&amp;nbsp;The condition is: &amp;quot;if the expression, count(.) = 0&amp;quot; then the action to set a field&amp;#39;s value would be &amp;quot;Former_Extension_Date = Extension_Date&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The second rule: The condition is: &amp;quot;if the expression, count(.)&amp;nbsp;&amp;gt;= 1&amp;quot; then the action to set a field&amp;#39;s value would be &amp;quot;Former_Extension_Date = preceding sybling:New_Extention_Date&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This does NOT work.&lt;/p&gt;
&lt;p&gt;If this makes sense to anyone, can this be accomplished with rules?&amp;nbsp; or do i have to write some code?&amp;nbsp; If code, then can someone give me some help with the code.&amp;nbsp; I am familiar with VB.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>