<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/67921.aspx</link><pubDate>Thu, 30 Jun 2011 13:17:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:67921</guid><dc:creator>Gyancher</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/67921.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=67921</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;this is great!! thank you so much. I was looking for something like this.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I needed a formula to populate the value from a end field into the next table.&lt;br /&gt;As thanks I attached my form for you all.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/24985.aspx</link><pubDate>Fri, 07 Dec 2007 11:15:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24985</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24985.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=24985</wfw:commentRss><description>&lt;p&gt;Hi sboyddyn and welcome to the forum!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You were so close!&amp;nbsp; Try this:&lt;/p&gt;
&lt;p&gt;normalize-space(preceding-sibling::Flight_Leg[position()&amp;nbsp;= 1]/@To_Airport)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have attached a sample I came up with to figure it out.&amp;nbsp; Hope this helps!&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/24973.aspx</link><pubDate>Thu, 06 Dec 2007 17:44:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:24973</guid><dc:creator>sboyddyn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/24973.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=24973</wfw:commentRss><description>&lt;p&gt;Hi Matt, &lt;/p&gt;
&lt;p&gt;You seem to know a lot about InfoPath and I know very little.&amp;nbsp; I have a similar problem as Soham.&amp;nbsp; I&amp;#39;m not&amp;nbsp;trying to do any calculations from the previous row but I want to&amp;nbsp;create a rule to set the next fields value from a&amp;nbsp;field in the previous row.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I have a repeating table that has leg numbers for flight logs.&amp;nbsp; Each New row is a new leg.&amp;nbsp; I have placed a rule on the repeating table (not the field) that if the leg number is not equal to 1, to set the From Airport to the preceding To_Airport (you will always leave the airplane you just left).&amp;nbsp; My rule does nothing on leg one, as it should and it works for leg 2&amp;nbsp; but it always returns&amp;nbsp;the same&amp;nbsp;To_Airport value for From_Airport that was on leg 1 for the rest of the legs so something is wrong with my node section (I think).&amp;nbsp; Here is my formula.&lt;/p&gt;
&lt;p&gt;normalize-space(preceding-sibling::*/@To_Airport[1])&amp;nbsp;&amp;nbsp; I&amp;#39;ve tried placing the rule on the To_Airport field and it brings nothing and won&amp;#39;t store any information in the field if I choose from the dropdown lists.&amp;nbsp; Placing the rule on the repeating table has so far got me the closest to what I&amp;#39;m looking for.&lt;/p&gt;
&lt;p&gt;The rule is not getting past the first row&amp;#39;s value.&amp;nbsp; Do you have any idea what I&amp;#39;m doing incorrectly?&amp;nbsp; I tried placing a position expression in each row to test the position and it always returns 1 but I do have a numbering &lt;u&gt;default &lt;/u&gt;formula for the leg number on each row in the repeating table that is working.&amp;nbsp; It&amp;#39;s formula is count(preceding-sibling::Flight_Leg/@Leg_No) + 1&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21347.aspx</link><pubDate>Fri, 29 Jun 2007 00:54:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21347</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21347.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21347</wfw:commentRss><description>&lt;p&gt;Matt - All i&amp;#39;m saying is that i have tried working on the paper and individually with each field on the form to achieve the results. If the formula is verified why doesn&amp;#39;t it work?&lt;/p&gt;&lt;p&gt;Take your Form for example - you have tried to have one set of calculation on the first row of the repating table (field2 = x + 10). And from 2nd row onwards its the sum of both fields in the same row (field 3 + field 4). &lt;/p&gt;&lt;p&gt;All i&amp;#39;m saying is try adding field2 value from first row to second [i.e. field 3 + field 4 + field2 (preceding-sibling)] - let me see how it goes because when i try that the field2 value comes to NaN (even&amp;nbsp; the formula is verified)&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21327.aspx</link><pubDate>Thu, 28 Jun 2007 11:17:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21327</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21327.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21327</wfw:commentRss><description>&lt;p&gt;Hi Soham,&lt;/p&gt;&lt;p&gt;I don&amp;#39;t know what else to tell you.&amp;nbsp; Try working it out on paper first, and then translating each individual piece, one by one.&amp;nbsp; Get the most complicated piece working first, and then add in the other piece, and then continue adding untill you find the problem.&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21320.aspx</link><pubDate>Thu, 28 Jun 2007 07:37:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21320</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21320.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21320</wfw:commentRss><description>Could anyone help and provide their expert advice?</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21234.aspx</link><pubDate>Tue, 26 Jun 2007 04:45:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21234</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21234.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21234</wfw:commentRss><description>&lt;p&gt;Matt,&lt;/p&gt;&lt;p&gt;Your form is 50% of what i&amp;#39;m looking for (i.e&amp;nbsp;1st row to have fdifferent calculation and 2nd row and onwards to have different calculations) - which is working fine.&lt;/p&gt;&lt;p&gt;The other 50 % is that from second row and onwards the field should also use previous row&amp;#39;s field value (preceding-sibling)&amp;nbsp;for calculations.&lt;/p&gt;&lt;p&gt;below if the default value formula for the field2 (from your form) all i have added is the bold portion to use the preceding-sibling in its calculation for 2nd row onwrads.&lt;/p&gt;&lt;p&gt;The&amp;nbsp;formula is verified but the value comes to NaN (even for the first row) - how can this be wrong or where&amp;#39;s the bug?`&lt;/p&gt;&lt;p&gt;(number(count(../preceding-sibling::my:group2) = 0) * (../../../my:field1 + 10)) + (number(count(../preceding-sibling::my:group2) &amp;gt; 0) * (../my:field3 + &lt;strong&gt;../preceding-sibling::my:group2/my:field2 &lt;/strong&gt;+ ../my:field4))&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21192.aspx</link><pubDate>Mon, 25 Jun 2007 09:30:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21192</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21192.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21192</wfw:commentRss><description>&lt;p&gt;Hi Soham,&lt;/p&gt;&lt;p&gt;I can&amp;#39;t debug forms from the forum for free (say that 10 times fast, haha), but if you would like to purchase some support credits we could solve the problem.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.qdabra.com/products_all.asp?cat=12"&gt;http://www.qdabra.com/products_all.asp?cat=12&lt;/a&gt;&lt;/p&gt;&lt;p&gt;For the preceding-sibling problem, you should use it to get to the previous sibling, and then go down to the node.&lt;/p&gt;&lt;p&gt;../preceding-sibling::my:GroupNode/my:TextNode&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21138.aspx</link><pubDate>Fri, 22 Jun 2007 04:56:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21138</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21138.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21138</wfw:commentRss><description>&lt;p&gt;Thanks Matt - the form is simple and self explanatory but what i&amp;#39;m trying to do is the 2nd row show first column should have default total (from the other columns) + the value of the first column first row. &lt;/p&gt;&lt;p&gt;The default value formula recognises preceding-sibling group but not the field.&lt;/p&gt;&lt;p&gt;Would it be easier if i attached my form?&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21111.aspx</link><pubDate>Thu, 21 Jun 2007 08:58:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21111</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21111.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21111</wfw:commentRss><description>&lt;p&gt;Hi Soham,&lt;/p&gt;&lt;p&gt;Default value formulas do recognize preceding-sibling, maybe you had an XPath incorrect.&amp;nbsp; I have made a simple sample&amp;nbsp;that demonstrates this in the attached file.&amp;nbsp; I think it should be pretty self explanatory, but let me know if there are any more problems.&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/21104.aspx</link><pubDate>Wed, 20 Jun 2007 23:55:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:21104</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/21104.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=21104</wfw:commentRss><description>Matt - default value formula does not recognise preceding-sibling. How did you approachw ith yoru sample form and how did the amount field get populated - by inserting new row or upon filling out any field in the same row? if you could detail your steps may be it might help.......thanks again</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/20997.aspx</link><pubDate>Wed, 20 Jun 2007 14:38:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20997</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20997.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20997</wfw:commentRss><description>&lt;p&gt;Hi Soham,&lt;/p&gt;&lt;p&gt;I&amp;#39;m not sure what the problem is.&amp;nbsp; I was able to get this to work with my sample form.&amp;nbsp; Have you tried using default value formulas instead of Rules?&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/20979.aspx</link><pubDate>Wed, 20 Jun 2007 06:12:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20979</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20979.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20979</wfw:commentRss><description>&lt;p&gt;Hi Matt,&lt;/p&gt;&lt;p&gt;Thanks for the help - your calcs makes sense but do not work -&amp;nbsp; the formula is correct and verified (see below what am i using) but the amount field do not get populated by the formula.&lt;/p&gt;&lt;p&gt;The way i apply the formula is on the Repeating Table by making a rule where the type (drop down) is equal to to 1 - expression used in the condition is &lt;strong&gt;self::my:group2/my:TypeOfIncrease = 1&lt;/strong&gt; then set the value of Amount field to the the below formula.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Formula&lt;/strong&gt; - (number(position() = 1) * ../../my:OriginalAmount * (self::my:group2[1]/my:Percent)) + (number(position() != 1) * (preceding-sibling::my:group2[1]/my:Amount) * (self::my:group2[1]/my:Percent))&lt;/p&gt;&lt;p&gt;Is it not working because i&amp;#39;m applying them in the repeating table rules? i also tried applying formula in the Amount field &amp;#39;s default value (of the repeating table) - but that does not recognise preceding-sibling .&lt;/p&gt;&lt;p&gt;Where did i go wrong here?&lt;/p&gt;&lt;p&gt;Also, how would the amount field get poplauted - on the selection of the dropdown or when i insert another row? i would like to&amp;nbsp;get the field poplated by the drop down selection or text entered in percent field in the same row.&lt;/p&gt;&lt;p&gt;Thanks Again&lt;/p&gt;</description></item><item><title>Re: Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/20929.aspx</link><pubDate>Tue, 19 Jun 2007 09:14:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20929</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20929.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20929</wfw:commentRss><description>&lt;p&gt;Hi Soham,&lt;/p&gt;&lt;p&gt;Cool calcs! This is a nice little trick I like to use:&lt;/p&gt;&lt;p&gt;(number(position() = 1) * FirstRowFormula)&amp;nbsp;+ (number(position() != 1) * AllOtherRowFormula)&lt;/p&gt;&lt;p&gt;This results in only applying the FirstRowFormula where position() = 1, and then only applying the AllOtherRowFormula wherever position() != 1.&amp;nbsp; Gotta love those mathematical properties!&lt;/p&gt;</description></item><item><title>Calculated value in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/20874.aspx</link><pubDate>Mon, 18 Jun 2007 07:23:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:20874</guid><dc:creator>Soham Bhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/20874.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=20874</wfw:commentRss><description>&lt;p&gt;I have form with repeating table (columns - Date, Amount, Type&amp;nbsp;and Percent). Amount field is calculated based on the Type and Percent. So for each new row inserted after 1st row the new amount is amount (from previous row) * percent (from previous row) * value (depends on type - from previous row) ....... i have used preceding-sibling in my repeating table rules to do the calculations - it all works fine and the way i want. But now there is a small change - the first row amount should now be calculated from a field outside the repeating table. lets say the field (outside repeating table) is called &amp;#39;OriginalAmount&amp;#39; - the first row amount field should now be then calculated as follows:&lt;/p&gt;&lt;p&gt;OriginalAmount * Percent (specified in first row) * value (specified in first row in Type).&lt;/p&gt;&lt;p&gt;The row after the first should then use the amount from previous row but use percent and value from the same row. How could i acheive this ?&lt;/p&gt;</description></item></channel></rss>