<?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: Repeating Table, want to sum current row based on other values.</title><link>https://www.infopathdev.com:443/forums/thread/104196.aspx</link><pubDate>Thu, 01 Oct 2015 14:50:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104196</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104196.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104196</wfw:commentRss><description>&lt;p&gt;So - this is a default value in a field inside the repeating table?&lt;/p&gt;&lt;p&gt;If so:&lt;/p&gt;&lt;p&gt;sum(xdXDocument:GetDOM(&amp;quot;Staffing Report&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Opens[../d:Band_x0020_ =current()/../my:Band and ../d:Work_x0020_City = xdXDocument:get-DOM()/my:myFields/my:LocationDropdown and ../d:_x0033__x002d_Dot_x0020_Hierarch = current()/../my:Hierarchy])&lt;/p&gt;&lt;p&gt;If that doesn&amp;#39;t do it, you can attach a copy of your form under the Options tab in a&amp;nbsp;reply and I can&amp;nbsp;give you a hand.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Repeating Table, want to sum current row based on other values.</title><link>https://www.infopathdev.com:443/forums/thread/104194.aspx</link><pubDate>Thu, 01 Oct 2015 14:38:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104194</guid><dc:creator>orbanez</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104194.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104194</wfw:commentRss><description>Hello,

I have a repeating table where I want to calculate a sum, based on a few criteria. In the image I have uploaded, the user selects the Location, and then populates a financial Hierarchy and Band (job level). Based on those criteria, I have a formula as the default value that queries a SharePoint list of HR data, matches the variables the user has populated in each line of the repeating table to the data and outputs a sum. I have this working but as I add rows descending, I find that the formula outputs the same sum regardless of the difference in variables on each row of the repeating table. I understand I need to somehow incorporate CURRENT into my formula but I can not! 

The formula is currently populated as:


sum(xdXDocument:GetDOM(&amp;quot;Staffing Report&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Opens[../d:Band_x0020_ = xdXDocument:get-DOM()/my:myFields/my:Group/my:RepeatingFields/my:Band and ../d:Work_x0020_City = xdXDocument:get-DOM()/my:myFields/my:LocationDropdown and ../d:_x0033__x002d_Dot_x0020_Hierarch = xdXDocument:get-DOM()/my:myFields/my:Group/my:RepeatingFields/my:Hierarchy])

Where can I incorporate &amp;#39;current()/&amp;#39; so that the sum is calculated properly for each row?

Thank you!</description></item></channel></rss>