<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Iterate through a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/32920.aspx</link><pubDate>Wed, 08 Oct 2008 06:43:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32920</guid><dc:creator>kev_wilson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32920.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32920</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve solved my problem. I have a working solution that does not use code but a formula in the default value for the price rate column with the &amp;quot;Update this value when the result of the formula is recalculated&amp;quot; as suggested earlier in the post. (cheers!) I applied conditional logic in the default value expression by applying the logic detailed in the following website... &lt;font color="#666666"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;&lt;font color="#666666"&gt;http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To apply the AND logic required I simply used the * (multiply) operator to multiply the result of each of the boolean conditions. If it is not true it will return 0 and true will return 1. For the condition to be true it requires 1 from each condition: &amp;nbsp;1*0 = 0, 1*1=1&amp;nbsp;:)&lt;/p&gt;
&lt;p&gt;Thanks for all your help with this, it has been greatly appreciated.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Kevin&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Iterate through a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/32917.aspx</link><pubDate>Wed, 08 Oct 2008 05:35:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32917</guid><dc:creator>kev_wilson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32917.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32917</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;Thanks for the repsonse. I was actually making some progress with another approach that you suggested in a previous blog which involved a formula in the default value which handled conditional IF logic:&lt;/p&gt;
&lt;p&gt;The approach is described in the the following website: &lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx"&gt;&lt;font color="#666666"&gt;http://blogs.msdn.com/infopath/archive/2006/11/27/conditional-default-values.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I can successfully select the correct column if it were based on one logic condition, for example&lt;/p&gt;
&lt;p&gt;concat(&lt;br /&gt;substring(xdXDocument:GetDOM(&amp;quot;ProductItemsData&amp;quot;)/ProductItems/ProductItem/PriceMinTwelveWeeks[../ProductItemDesc = current()/../my:ProductItem], 1, (../my:LengthOfHire &amp;gt;= 84) * string-length(xdXDocument:GetDOM(&amp;quot;ProductItemsData&amp;quot;)/ProductItems/ProductItem/PriceMinTwelveWeeks[../ProductItemDesc = current()/../my:ProductItem])),&lt;br /&gt;substring(xdXDocument:GetDOM(&amp;quot;ProductItemsData&amp;quot;)/ProductItems/ProductItem/PriceOneDay[../ProductItemDesc = current()/../my:ProductItem], 1, (../my:LengthOfHire &amp;lt; 3) * string-length(xdXDocument:GetDOM(&amp;quot;ProductItemsData&amp;quot;)/ProductItems/ProductItem/PriceOneDay[../ProductItemDesc = current()/../my:ProductItem]))&lt;br /&gt;)&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;However I need to check if the number is &amp;gt; AND &amp;lt;. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;eg.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;(../my:LengthOfHire&amp;nbsp;&amp;gt;&amp;nbsp;0 AND ../my:LengthOfHire &amp;lt; 3)&lt;/p&gt;
&lt;p&gt;(../my:LengthOfHire&amp;nbsp;&amp;gt;= 3&amp;nbsp; AND ../my:LengthOfHire &amp;lt; 7)&lt;/p&gt;
&lt;p&gt;(../my:LengthOfHire&amp;nbsp;&amp;gt;=&amp;nbsp;7 AND ../my:LengthOfHire &amp;lt; 28)&lt;/p&gt;
&lt;p&gt;etc&lt;/p&gt;
&lt;p&gt;Do you know if it is possible to do AND logic using the CONCAT and Substring approach?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks in advance.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Kevin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Iterate through a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/32915.aspx</link><pubDate>Wed, 08 Oct 2008 03:18:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32915</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32915.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32915</wfw:commentRss><description>&lt;p&gt;I think you may need code. Which version of InfoPath are you using? 2003 or 2007? I ask because the object models are different. In general terms, in the Changed (onAfterChange for 2003 OM) for your number of days in your length of hire field, you select the repeating group or field, and iterate through all the nodes. For example, in C# for the 2007 OM:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;public&lt;/font&gt; &lt;font color="#0000ff"&gt;void&lt;/font&gt; field4_Changed(&lt;font color="#0000ff"&gt;object&lt;/font&gt; sender, &lt;font color="#2b91af"&gt;XmlEventArgs&lt;/font&gt; e)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#2b91af"&gt;XPathNodeIterator&lt;/font&gt; nodes = MainDataSource.CreateNavigator().Select(&lt;font color="#a31515"&gt;&amp;quot;/my:myFields/my:group1/my:group2&amp;quot;&lt;/font&gt;, NamespaceManager);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#0000ff"&gt;foreach&lt;/font&gt; (&lt;font color="#2b91af"&gt;XPathNavigator&lt;/font&gt; node &lt;font color="#0000ff"&gt;in&lt;/font&gt; nodes)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; node.SelectSingleNode(&lt;font color="#a31515"&gt;&amp;quot;my:field1&amp;quot;&lt;/font&gt;, NamespaceManager).SetValue(&lt;font color="#a31515"&gt;&amp;quot;new value&amp;quot;&lt;/font&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:0pt;LINE-HEIGHT:normal;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT:0in;MARGIN-TOP:0in;PADDING-LEFT:0in;FONT-SIZE:11pt;MARGIN-BOTTOM:10pt;LINE-HEIGHT:115%;"&gt;&lt;span style="FONT-SIZE:10pt;"&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Iterate through a repeating table</title><link>https://www.infopathdev.com:443/forums/thread/32907.aspx</link><pubDate>Wed, 08 Oct 2008 01:41:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32907</guid><dc:creator>kev_wilson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32907.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32907</wfw:commentRss><description>&lt;p&gt;Hi Santhoshp,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;not using the default value&amp;nbsp;to populate the PriceRate column. It is currently being populated from a set of rules that are on the productItem drop down box which is in the same row in the repeating table. The product item drop down box is populated from a secondary data source that contains a list of all products and a number of colums for different day rates depending on the length of the hire of the product. e.g.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;ProductItem&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ProductItemDesc&amp;gt;Product 1&amp;lt;/ProductItemDesc&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PriceMinSevenDays&amp;gt;100.00&amp;lt;/PriceMinSevenDays&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PriceMinTwentyEightDays&amp;gt;95.00&amp;lt;/PriceMinTwentyEightDays&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PriceMinTwelveWeeks&amp;gt;60.00&amp;lt;/PriceMinTwelveWeeks&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/ProductItem&amp;gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;currently have rules for each price rate column in the dataset&amp;nbsp;on the ProductItem drop down box that sets the value of the PriceRate column in the repeating table with the appropriate PriceRate depending on the number of days in the lengthofhire field (which is outside the repeating table) - each rule has a condition i.e. Length of Hire &amp;gt;= 0 and &amp;lt; 3 . The initial setting of the price rate works when you add a new product. However I want to be able to re-calculate the price rate for each product in the repeating table if the user goes back and changes the number of days (length of hire).&lt;/p&gt;
&lt;p&gt;Any ideas or further suggestions would be greatly appreciated. Not sure if this is possible without writing code?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Kevin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Iterate through a repating table</title><link>https://www.infopathdev.com:443/forums/thread/32884.aspx</link><pubDate>Tue, 07 Oct 2008 12:15:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32884</guid><dc:creator>santhoshp</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32884.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32884</wfw:commentRss><description>&lt;p&gt;Hi Kevin,&lt;/p&gt;
&lt;p&gt;How you are calculating Price column? If you are using Default vlaue in Text Box Properties window then make sure that &amp;#39;Update this value when the result of the formula is recalculated&amp;#39; check box is checked.&lt;/p&gt;</description></item><item><title>Iterate through a repating table</title><link>https://www.infopathdev.com:443/forums/thread/32883.aspx</link><pubDate>Tue, 07 Oct 2008 11:22:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32883</guid><dc:creator>kev_wilson</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32883.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32883</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a repeating table that contains a column (Price) that derives it&amp;#39;s value from referencing a field value outside the repeating table (NumberHours). When I create a new row in the table the Price column is derived correctly. However I need to handle the situation where the user changes the number of hours which would result in a different price for each row. Is there a way I can re-evaulate the column for all rows in the repeating table when the NumberHours value is changed. i.e. iterate through each row in the table and&amp;nbsp;derive the&amp;nbsp;price again for the&amp;nbsp;changed number of hours? &lt;/p&gt;
&lt;p&gt;Is it possible to do this without code? If not can anybody point me in the right direction to do this in C#&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any help with this will be greatly appreciated.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Cheers&lt;/p&gt;
&lt;p&gt;Kevin&lt;/p&gt;</description></item></channel></rss>