<?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: sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/125462.aspx</link><pubDate>Tue, 30 Jan 2024 15:56:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125462</guid><dc:creator>stevec</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125462.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=125462</wfw:commentRss><description>Thank you for reply - I will give those a go and let you know if any of them work.</description></item><item><title>Re: sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/125460.aspx</link><pubDate>Tue, 30 Jan 2024 15:15:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125460</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125460.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=125460</wfw:commentRss><description>I&amp;#39;ve attached a sample form. Right click the linked form, select save as to save locally. Right click the saved form, select Design to open in design mode, then preview. I used your XML as a secondary data source. I think there may be two issues with your formula - but I don&amp;#39;t know how your form is set up. That is, I don&amp;#39;t know where the control using your formula is located. You&amp;#39;ll see in my form, the balance column is inside the repeating table - so the context is the repeating &amp;quot;StatementLine&amp;quot; node. Yours, since I see &amp;quot;../../../&amp;quot; in it, I&amp;#39;m assuming it is somehow not in the repeating table. I would think for a running table, you need the sum of the preceding rows along with the current row values, like: sum(preceding-sibling::dsStatement:StatementLine/dsStatement:InvoiceCharge) + sum(preceding-sibling::dsStatement:StatementLine/dsStatement:InvoiceCredit + dsStatement:StatementLine/dsStatement:InvoiceCharge + dsStatement:StatementLine/dsStatement:InvoiceCredit</description></item><item><title>Re: sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/125458.aspx</link><pubDate>Tue, 30 Jan 2024 14:31:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:125458</guid><dc:creator>stevec</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/125458.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=125458</wfw:commentRss><description>I know this is an older thread but hoping for some assistance. 

My XML (nodes) look like this - replacing the arrow brackets with round for formatting 

&lt;ul class="anf_list"&gt;(dsStatement)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(tt-printdata)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(EmailSubject)Statement(/EmailSubject)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(/tt-printdata)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(StatementHeader)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(CompanyNo)5000(/CompanyNo)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(StatementLine)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCharge)689.0(/InvoiceCharge)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCredit)0(/InvoiceCredit)&lt;/ul&gt;                  
&lt;ul class="anf_list"&gt;(/StatementLine)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(StatementLine)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCharge)0(/InvoiceCharge)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCredit)-89.0(/InvoiceCredit)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(/StatementLine)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(StatementLine)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCharge)129.0(/InvoiceCharge)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCharge)129.0(/InvoiceCharge)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(InvoiceCredit)0(/InvoiceCredit)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(/StatementLine)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(/StatementHeader)&lt;/ul&gt;
&lt;ul class="anf_list"&gt;(/dsStatement)&lt;/ul&gt;

&lt;br /&gt;My desired output would be an extra column that gives me the running total of the statement. 

&lt;p&gt;
Charge    Credit       Balance 
&lt;/p&gt;689.00 0 689.00
&lt;p&gt;0 -89.00 600.00&lt;/p&gt;
129.00    0             729.00
&lt;/p&gt;
&lt;p&gt;I tried the following (don&amp;#39;t get any errors) but just calculates as 0.00 &lt;/p&gt;


sum(../../../preceding-sibling::dsStatement:StatementLine/dsStatement:InvoiceCharge) + sum(../../../preceding-sibling::dsStatement:StatementLine/dsStatement:InvoiceCredit)

I&amp;#39;ve tried re-creating this with no luck so any help / assistance would be greatly appeciated.</description></item><item><title>Re: sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/79864.aspx</link><pubDate>Tue, 26 Jun 2012 15:18:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79864</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79864.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=79864</wfw:commentRss><description>&lt;p&gt;.. moves you to the parent - &lt;a href="http://www.w3schools.com/xpath/xpath_syntax.asp"&gt;here&amp;#39;s&lt;/a&gt; a W3 Schools page with a bit more explanation. &lt;/p&gt;</description></item><item><title>Re: sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/79853.aspx</link><pubDate>Tue, 26 Jun 2012 06:53:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79853</guid><dc:creator>HaiPeng</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79853.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=79853</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Yes, that&amp;#39;s it! Thank you!&lt;/p&gt;&lt;p&gt;&amp;nbsp;So all I was missing was another &amp;quot;../&amp;quot;? I spent so many hours trying to figure it out... I thought each dot would move me up one parent node.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Just in case someone else finds this post with a similar problem:&lt;/p&gt;&lt;p&gt;&amp;nbsp;I also added a subtotal which includes the amount of the current node. The formular then reads: &amp;quot;sum(../../preceding-sibling::my:RepSec/my:Amount) + sum(../../self::my:RepSec/my:Amount) &lt;/p&gt;</description></item><item><title>Re: sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/79820.aspx</link><pubDate>Mon, 25 Jun 2012 15:39:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79820</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79820.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=79820</wfw:commentRss><description>&lt;p&gt;What about:&lt;/p&gt;
&lt;p&gt;sum(../../preceding-sibling::my:RepSec/my:Amount)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>sum preceding nodes in repeating sections</title><link>https://www.infopathdev.com:443/forums/thread/79627.aspx</link><pubDate>Tue, 19 Jun 2012 08:07:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:79627</guid><dc:creator>HaiPeng</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/79627.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=79627</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello,&lt;br /&gt;I&amp;#39;m using &lt;a href="http://www.infopathdev.com/forums/post/21817.aspx" title="Shiraz Copula" target="_blank"&gt;Shiraz Cupala&lt;/a&gt;&amp;#39;s method to repeat table headers of a repeating table across multiple pages - and it works great.&lt;/p&gt;&lt;p&gt;However, I also want to add a field displaying the amount carried over from the preceeding page. Placing the field at the appropriat position on every page isn&amp;#39;t a problem but I can&amp;#39;t get the &amp;quot;sum()&amp;quot; expression right.&lt;/p&gt;&lt;p&gt;My Node-Tree looks like this:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;MyFields&lt;/li&gt;&lt;ul&gt;&lt;li&gt;RepSecGroup&lt;/li&gt;&lt;ul&gt;&lt;li&gt;RepSec&lt;/li&gt;&lt;ul&gt;&lt;li&gt;PBreak&lt;/li&gt;&lt;li&gt;ColumnHead&lt;/li&gt;&lt;li&gt;Date&lt;/li&gt;&lt;li&gt;Occasion&lt;/li&gt;&lt;li&gt;Amount&lt;/li&gt;&lt;li&gt;CarryOver Amount&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Sum&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;p&gt;I want my &amp;quot;carry over&amp;quot;(called &amp;quot;sum&amp;quot;) field to sum up the values from all &amp;quot;Amount&amp;quot;-Nodes in the preceding sections and I don&amp;#39;t know how to point my sum-command to that node-set.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;My guess was: sum(../preceding-sibling::my:RepSec/my:Amount) with .. going to parent node, then to the preceding sibling nodes of that and from there into the actual node I want within each sibling node. But that isn&amp;#39;t working.&lt;/p&gt;&lt;p&gt;Is there a good source for learning how to &amp;quot;navigate&amp;quot; XPath? MSDN seems to only have an overview of some possible functions to be used in InfoPath expressions &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>