<?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: Calculations using xpath not working</title><link>https://www.infopathdev.com:443/forums/thread/18191.aspx</link><pubDate>Mon, 25 Sep 2006 15:06:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18191</guid><dc:creator>ckpaulie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18191.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18191</wfw:commentRss><description>I solved the problem but I still don't know the cause.  I completely rebuilt the form from scratch; verifying that the default formulas still worked after each Data Connection, form code block, and other customization was added.  I duplicated every setting I could think of and even copied the views from the orignal form into the new one.  Still, the new form's calculations worked.&lt;br /&gt;&lt;br /&gt;Any ideas why the original template's formulas stopped calculating?&lt;br /&gt;&lt;br /&gt;Chris</description></item><item><title>Calculations using xpath not working</title><link>https://www.infopathdev.com:443/forums/thread/18033.aspx</link><pubDate>Fri, 22 Sep 2006 19:59:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18033</guid><dc:creator>ckpaulie</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18033.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18033</wfw:commentRss><description>My form uses an xml structure similar to the following:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;BOM&amp;gt;&lt;br /&gt;   &amp;lt;Cost /&amp;gt;&lt;br /&gt;   &amp;lt;BOMLine&amp;gt;&lt;br /&gt;      &amp;lt;Cost /&amp;gt;&lt;br /&gt;      &amp;lt;DesignQty /&amp;gt;&lt;br /&gt;      &amp;lt;Component&amp;gt;&lt;br /&gt;        &amp;lt;Cost /&amp;gt;&lt;br /&gt;      &amp;lt;/Component&amp;gt;&lt;br /&gt;   &amp;lt;/BOMLine&amp;gt;&lt;br /&gt;   &amp;lt;BOMLine&amp;gt;&lt;br /&gt;      &amp;lt;Cost /&amp;gt;&lt;br /&gt;      &amp;lt;DesignQty /&amp;gt;&lt;br /&gt;      &amp;lt;UnknownComponent&amp;gt;&lt;br /&gt;        &amp;lt;Cost /&amp;gt;&lt;br /&gt;      &amp;lt;/UnknownComponent&amp;gt;&lt;br /&gt;   &amp;lt;/BOMLine&amp;gt;&lt;br /&gt;&amp;lt;/BOM&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Notice that the BOMLine/Component and BOMLine/UnknownComponent are part of a choice group.&lt;br /&gt;&lt;br /&gt;I have tried to set the default value of the BOMLine/Cost element using the following xpath formula:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   sum(parent::BOMLine//Cost[parent::Component or parent::UnknownComponent])&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The resulting value for the BOMLine/Cost element is nothing.  The only time a value is ever produced is if I hard code the default as a constant (e.g. "1").&lt;br /&gt;&lt;br /&gt;I looked in the manifest.xsf and I see the &amp;lt;xsf:calculatedField&amp;gt; specifed correctly in the &amp;lt;xsf:calculations&amp;gt; element.  It is set to update automatically.  Also, an expression box using the same formula does produce the correct values.  Why is the field not being updated?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;Chris</description></item></channel></rss>