<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43250.aspx</link><pubDate>Sat, 20 Jun 2009 19:09:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43250</guid><dc:creator>pdjohnson_2000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43250.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43250</wfw:commentRss><description>&lt;p&gt;That worked great! Thank you so much! &lt;/p&gt;
&lt;p&gt;The reason I&amp;#39;m using the template parts is that I am building a&amp;nbsp;series of questionnaires and I&amp;nbsp;have about 100 questions that I need to create in various forms. The answer to each question could have a different format (number, text, date, pick list, etc) so I don&amp;#39;t think creating a repeating section to hold all of the questions would work. I&amp;#39;m also going to need to create different rules for each question to validate each response, so I think each question needs to be its own node in the data structure. I could use the Reference feature, but then I think I would need to create each question data structure by hand, and with so many to create I would rather not go that route. If I use the template part to represent a single question, I can quickly create the data structure I need (just insert 100 template parts into a form template). Then I can customize from there.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks again for your help!!&lt;/p&gt;</description></item><item><title>Re: Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43249.aspx</link><pubDate>Sat, 20 Jun 2009 18:54:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43249</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43249.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43249</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;warrtalon:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Anyway, Jimmy are you referring to using the Reference function so that all the fields are named the same but contain their own data?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Either that, or just use a repeating field at the top of the structure, depending on whether he wants all of the &lt;i&gt;item &lt;/i&gt;nodes under a common parent or not.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43248.aspx</link><pubDate>Sat, 20 Jun 2009 18:37:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43248</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43248.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43248</wfw:commentRss><description>&lt;p&gt;Yeah, I could not figure out how to change that expression properly.&amp;nbsp; I was having trouble with &amp;quot;following&amp;quot; and with the dot (.) reference.&amp;nbsp; It seemed to be referencing the&amp;nbsp;numComplete field instead of the complete fields.&lt;/p&gt;
&lt;p&gt;Anyway, Jimmy are you referring to using the Reference function so that all the fields are named the same but contain their own data?&lt;/p&gt;</description></item><item><title>Re: Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43247.aspx</link><pubDate>Sat, 20 Jun 2009 17:40:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43247</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43247.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43247</wfw:commentRss><description>&lt;p&gt;InfoPath seems to have an issue with the following:: axis.&amp;nbsp; If you change the formula to:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;count(..//*[starts-with(name(), &amp;quot;my:complete&amp;quot;) and . = 1]) &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;then it works, though it seems to me like questionable design to be generating unique node names like that.&amp;nbsp; Is there a reason why they can&amp;#39;t all be named my:complete?&amp;nbsp; I think that would be more orthodox.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43246.aspx</link><pubDate>Sat, 20 Jun 2009 17:23:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43246</guid><dc:creator>pdjohnson_2000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43246.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43246</wfw:commentRss><description>&lt;p&gt;Sorry, here is the file.&lt;/p&gt;</description></item><item><title>Re: Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43245.aspx</link><pubDate>Sat, 20 Jun 2009 17:07:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43245</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43245.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43245</wfw:commentRss><description>&lt;p&gt;Sounds like you&amp;#39;re doing it correctly, and I didn&amp;#39;t even know that Xpath statement was possible, so that is very cool.&amp;nbsp; Maybe if you attach the XSN, I might be able to find a slight logic error.&amp;nbsp; I don&amp;#39;t think I could figure it out otherwise, because you&amp;#39;re already doing what I would suggest you do to ensure it updates.&lt;/p&gt;</description></item><item><title>Text box with Xpath formula won't recalculate</title><link>https://www.infopathdev.com:443/forums/thread/43244.aspx</link><pubDate>Sat, 20 Jun 2009 17:01:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43244</guid><dc:creator>pdjohnson_2000</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43244.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=43244</wfw:commentRss><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;I am using the form template feature in InfoPath 2007 and inserting several instances of the same template part into a form. When I do this, it automatically appends and _1, _2 etc. after the field names so they are unique in the form. For example, I have a True/False&amp;nbsp;element in the template part called &amp;quot;complete&amp;quot;, and when I insert it several times into a template&amp;nbsp;I get complete_1, complete_2, complete_3, etc.&lt;/p&gt;
&lt;p&gt;What I would like to do is create a field in my template&amp;nbsp;that counts the number of &amp;quot;complete&amp;quot; elements that are checked in the form. Their element names&amp;nbsp;are all different, but they all start with &amp;quot;complete_&amp;quot;, so I created the following XPath expression to do this:&lt;/p&gt;
&lt;p&gt;count(following::*[starts-with(name(), &amp;quot;my:complete&amp;quot;) and . = 1])&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This correctly counts any element who&amp;#39;s name starts with the string &amp;quot;complete&amp;quot; and is equal to 1.&lt;/p&gt;
&lt;p&gt;When I give a field this formula as its default value, the value gets set properly when the form opens. The problem is that it does not update as the form changes, even though I have the &amp;quot;Update this value when the result of the formula is recalculated&amp;quot; option checked off. I would expect this to update when I check complete_1, complete_2, etc. &lt;/p&gt;
&lt;p&gt;Can anyone help?&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>