<?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 Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38737.aspx</link><pubDate>Fri, 20 Feb 2009 21:58:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38737</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38737.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38737</wfw:commentRss><description>&lt;p&gt;Hi Igor92128,&lt;/p&gt;
&lt;p&gt;You can browser-enable a form with code but it requires an extra activation when&amp;nbsp;publishing to SharePoint (due to security restrictions of adding code). &amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38717.aspx</link><pubDate>Fri, 20 Feb 2009 19:05:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38717</guid><dc:creator>igor92128</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38717.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38717</wfw:commentRss><description>&lt;p&gt;Jimmy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Is there any way to do this in a browser-only enabled form? I&amp;#39;d like to create a 2nd version.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Igor&lt;/p&gt;</description></item><item><title>Re: Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38648.aspx</link><pubDate>Thu, 19 Feb 2009 21:49:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38648</guid><dc:creator>igor92128</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38648.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38648</wfw:commentRss><description>&lt;p&gt;Thanks Jimmy, this works well.&lt;/p&gt;</description></item><item><title>Re: Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38536.aspx</link><pubDate>Wed, 18 Feb 2009 01:25:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38536</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38536.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38536</wfw:commentRss><description>&lt;p&gt;Ok, please try putting this code in the event handler for a button.&amp;nbsp; You will need to change the underlined parts.&amp;nbsp; The first underlined part corresponds to the path of the field where the user will enter the count, and the second is the path of the repeating group on your form:&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; mainDataNavigator = MainDataSource.CreateNavigator();&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// select the field where the user is entering the number&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; countField = mainDataNavigator.SelectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&lt;strong&gt;&lt;u&gt;/my:myFields/my:field1&lt;/u&gt;&lt;/strong&gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager);&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; requestedCount;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// check that the value of the field is a valid number and parse it if it is&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Int32&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.TryParse(countField.Value, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;out&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; requestedCount))&lt;br /&gt;{&lt;/font&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// determine the number of rows already in the table&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; currentCount = mainDataNavigator.Select(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&lt;strong&gt;&lt;u&gt;/my:myFields/my:group1/my:group2&lt;/u&gt;&lt;/strong&gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, NamespaceManager).Count;&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;// if the table already has as many as, or more rows than the user requested, show an error&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (currentCount &amp;gt;= requestedCount)&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;MessageBox&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Show(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Format(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;The table already has {0} rows.&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, currentCount));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;}&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;else&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// add rows to the table until the total number of rows is the requested number&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;for&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (; currentCount &amp;lt; requestedCount; currentCount++)&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// The xmlToEdit value (&amp;quot;group2_1&amp;quot; here) can be found in the repeating&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;// table&amp;#39;s properties on the Advanced tab&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentView.ExecuteAction(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ActionType&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.XCollectionInsert, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&lt;strong&gt;&lt;u&gt;group2_1&lt;/u&gt;&lt;/strong&gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;}&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;}&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;else&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// If the entered number could not be parsed, show an error.&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;MessageBox&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Show(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Please enter a valid number.&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;}&lt;/blockquote&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38527.aspx</link><pubDate>Tue, 17 Feb 2009 20:45:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38527</guid><dc:creator>igor92128</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38527.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38527</wfw:commentRss><description>&lt;p&gt;Jimmy,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I would like to do this in C#.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks,&lt;br /&gt;Igor&lt;/p&gt;</description></item><item><title>Re: Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38444.aspx</link><pubDate>Mon, 16 Feb 2009 06:37:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38444</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38444.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38444</wfw:commentRss><description>&lt;p&gt;Igor, there is no way to do what you described using rules, though it is easy enough if you use code.&lt;/p&gt;
&lt;p&gt;Please let me know if you would like to go that route, and what type of code (JScript, C#, VB) you would like to use.&lt;/p&gt;</description></item><item><title>Re: Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38443.aspx</link><pubDate>Mon, 16 Feb 2009 06:12:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38443</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38443.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38443</wfw:commentRss><description>Hi, 
&lt;p&gt;Add the default value to the text box using the following steps. So that when the user inserts/deletes the row from the repeating section, it automatically updates the value.&lt;/p&gt;
&lt;p&gt;1. Go to the text box properties. &lt;/p&gt;
&lt;p&gt;2. Click on fx button beside the Value box.&lt;/p&gt;
&lt;p&gt;3. Select the Count function.&lt;/p&gt;
&lt;p&gt;4. In that enter the xpath of the repeating section.&lt;/p&gt;
&lt;p&gt;The expression should look like&lt;/p&gt;
&lt;p&gt;count(/my:myFields/my:group1/my:group2)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;here /my:myFields/my:group1/my:group2 is the repeating section xpath.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Repeating Section Count</title><link>https://www.infopathdev.com:443/forums/thread/38428.aspx</link><pubDate>Sat, 14 Feb 2009 00:34:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38428</guid><dc:creator>igor92128</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38428.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=38428</wfw:commentRss><description>&lt;p&gt;I have a repeating control and I would like the user to specify how many times the control should repeat. I just have a textbox and a button and I am trying to get the rule working for the button, but I can only set a field&amp;#39;s value. Is there a way, using rules, that I could set the count(repeating_section) to what is typed in the textbox?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks,&lt;br /&gt;Igor&lt;/p&gt;</description></item></channel></rss>