<?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>Search results for 'preceding-sibling'</title><link>https://www.infopathdev.com:443/search/SearchResults.aspx?q=preceding-sibling</link><description>Search results for 'preceding-sibling'</description><dc:language>en-US</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/p/23014/125460.aspx#125460</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><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/p/23014/125458.aspx#125458</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><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: Repeating Table Issues</title><link>https://www.infopathdev.com:443/forums/p/40306/124685.aspx#124685</link><pubDate>Thu, 20 Jan 2022 23:53:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124685</guid><dc:creator>Hilary Stoupa</dc:creator><description>I&amp;#39;ll try to upload a copy w/ changes tomorrow. I do see on the repeating table formatting you are comparing title to category in the preceding-sibling condition - that would be why they are all hiding.</description></item><item><title>Re: Repeating Table Issues</title><link>https://www.infopathdev.com:443/forums/p/40306/124677.aspx#124677</link><pubDate>Thu, 20 Jan 2022 17:26:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124677</guid><dc:creator>Froman</dc:creator><description>That&amp;#39;s what I thought, but it hides everything. which in turn causes the sum to not work properly (i think?). just to confirm, the preceding-sibling rule goes on the repeating table and the sum formula would be used 4 times, one for each quarter? what about category in the repeating table? I was just using d:category, but does that need a formula as well (current() perhaps?) I changed the DC for IBP to save the data (junk) into the form and reattached</description></item><item><title>Re: Repeating Table Issues</title><link>https://www.infopathdev.com:443/forums/p/40306/124668.aspx#124668</link><pubDate>Thu, 20 Jan 2022 00:10:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124668</guid><dc:creator>Hilary Stoupa</dc:creator><description>So - this is on the Totals view? You want each category to display only one time? That would be a preceding-sibling condition - hide if category = preceding-sibling category. d:Category = preceding-sibling::d:SharePointListItem_RW/d:Category is the expression I&amp;#39;d try. Then for your sum formula - probably something like this (for each of your quarters that you are adding together): sum(xdXDocument:GetDOM(&amp;quot;IBP&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:Category = current()/d:Category]/d:_x0051_1) </description></item><item><title>Re: Repeating Table Issues</title><link>https://www.infopathdev.com:443/forums/p/40306/124665.aspx#124665</link><pubDate>Wed, 19 Jan 2022 20:29:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124665</guid><dc:creator>Froman</dc:creator><description>I can&amp;#39;t seem to get something else to work, I&amp;#39;ve got a new page with a similar repeating table on it, but am having issues getting it to display the way I want it. This table needs to be a sum of years per category. I am fairly certain I need to use preceding:sibling and/or the current() function to get it to hide unwanted rows. right now it will show the category for each year, I would like it to only show the categories once (rule preceding sibling on repeating table?) and then sum the YTD of all years per category. I feel like the category in the repeating table should be using current() and the repeating talbe should hide preceding sibling, but I can&amp;#39;t seem to make it come together. am I way off base in the rules/formulas I need. or can this not even be done?
Thanks</description></item><item><title>Re: How to manage Progress Status movements in a form</title><link>https://www.infopathdev.com:443/forums/p/40253/124427.aspx#124427</link><pubDate>Thu, 09 Sep 2021 17:39:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124427</guid><dc:creator>markikav</dc:creator><description>Awesome Hilary this helps alright, thanks!&lt;br /&gt;
&lt;br /&gt;
So it&amp;#39;s a one column SharePoint list to hold the stages 1-&amp;gt; 12 for example.&lt;br /&gt;

Then in the form Stages field entries set the filter exactly as you have, selecting the correct field that holds the values form the external list, &lt;br /&gt;
&lt;br /&gt;
preceding-sibling::Status[1] = xdXDocument:get-DOM()/my:myFields/my:field1&lt;br /&gt;
following-sibling::Status[1] = xdXDocument:get-DOM()/my:myFields/my:field1&lt;br /&gt;
&lt;br /&gt;
And this allows you to go to the next stage or back to the previous stage.&lt;br /&gt;
&lt;br /&gt;
I know they have multiple jump off points at some stages i.e. it could possibly go down a happy path or an alternative path, is this possible too or are we limited to one stage movements? &lt;br /&gt;
&lt;br /&gt;
This is great though thanks! </description></item><item><title>Repeating Table</title><link>https://www.infopathdev.com:443/forums/p/40226/124271.aspx#124271</link><pubDate>Fri, 23 Jul 2021 20:00:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124271</guid><dc:creator>Froman</dc:creator><description>Hi, I&amp;#39;m having an issue getting a repeating table to show only what I want it to, and I&amp;#39;m not sure if want I want is even possible. The repeating table is supposed to only show vendors when the work category matches their &amp;quot;profile&amp;quot; which is currently does, but it leave blanks when you change the work category, I cannot seem to make the table arrange itself when the amount of vendors changes. I tried to use preceding sibling, but for whatever reason its not working. I&amp;#39;ve attached my form if anyone can take a quick look.
Thanks</description></item><item><title>Re: Unique values from repeating table</title><link>https://www.infopathdev.com:443/forums/p/40198/124184.aspx#124184</link><pubDate>Thu, 10 Jun 2021 04:51:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124184</guid><dc:creator>ncodename.sabir</dc:creator><description>Thank you very much Hilary!


One more little problem is all values from table is setting to field. I need only Drawing_no field to be there (marked with yellow). I don&amp;#39;t need a cable tag to be there.


xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM(&amp;quot;Electrical_requisiton_Drawings&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[not(d:Drawing_No = preceding-sibling::d:SharePointListItem_RW/d:Drawing_No)], &amp;#39;concat(., &amp;quot;;&amp;quot;)&amp;#39;), &amp;quot;..&amp;quot;)</description></item><item><title>Re: Unique values from repeating table</title><link>https://www.infopathdev.com:443/forums/p/40198/124181.aspx#124181</link><pubDate>Wed, 09 Jun 2021 16:16:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:124181</guid><dc:creator>Hilary Stoupa</dc:creator><description>I&amp;#39;ve attached a sample - right click and save locally, right click, select design and preview. Add some rows to the repeating table, and set some of the fields to the same value. For your formula, I&amp;#39;d try: xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM(&amp;quot;Electrical_requisiton_Drawings&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[not(d:Drawing_No = preceding-sibling::d:SharePointListItem_RW/d:Drawing_No], &amp;#39;concat(d:Drawing_No, &amp;quot;;&amp;quot;)&amp;#39;), &amp;quot;..&amp;quot;)</description></item></channel></rss>