<?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: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/49551.aspx</link><pubDate>Tue, 01 Dec 2009 01:37:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49551</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49551.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=49551</wfw:commentRss><description>&lt;p&gt;Modify the schema to add maxOccurs attribute to the node. You&amp;#39;ll have to save as source files. Open up the XSD. Find the node and insert maxOccurs on it. Then save and right click manifest.xsf to get back into Design mode so you can publish with the manually tweaked schema.&lt;/p&gt;
&lt;p&gt;Ain&amp;#39;t InfoPath wonderful! :)&lt;/p&gt;
&lt;p&gt;Funny! That&amp;#39;s the same thing Jimmy recommended. :)&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/49550.aspx</link><pubDate>Tue, 01 Dec 2009 01:20:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49550</guid><dc:creator>aberya</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49550.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=49550</wfw:commentRss><description>&lt;p&gt;Yeah I tried that as well, but found that when you hit the limit the user cannot delete any sections.&amp;nbsp; It would be good in sone cases but I needed to stop users from adding new items.&amp;nbsp; Its a pity the condition is both insert and delete and not seperated.&lt;/p&gt;
&lt;p&gt;In actual fact if you limit your forms to Browser based forms only, Form Services does display a nice error message when the XSD Schema has an upper bounds so you don&amp;#39;t need to do anything other than that, its when you want a form to be edited in&amp;nbsp;InfoPath when it&amp;nbsp;displays the user unfriendly message.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/49548.aspx</link><pubDate>Mon, 30 Nov 2009 22:41:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49548</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49548.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=49548</wfw:commentRss><description>&lt;p&gt;Hello @all,&lt;/p&gt;
&lt;p&gt;I don´t know if I misunderstood the above mentioned problem but why can´t you just use an expression like &lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;&lt;font size="3"&gt;&lt;strong&gt;Expression:&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;count(my:field1) &amp;gt;= &amp;quot;3&amp;quot;&lt;br /&gt;&lt;strong&gt;Condition:&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Don´t allow users to insert or delete this control ==&amp;gt; Activate&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;In my opinion that´s the easiest way to limit the number of sections that can be inserted.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/49544.aspx</link><pubDate>Mon, 30 Nov 2009 21:19:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49544</guid><dc:creator>aberya</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49544.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=49544</wfw:commentRss><description>&lt;p&gt;
It doesn&amp;#39;t look like you can alter the error message that InfoPath displays when using Browser enabled forms, well without using code.

What I have done in the past is to display an expression box with the error message desired and set  conditional formating to display only when the number of occurences of the reapeating section is equal to the maximum.  You still get an error message if you add another section, but better than what InfoPath provides out of the box.  

I tried adding a conditional format on the section to not allow adding once the number of ocurrences was at the maximum but that didn&amp;#39;t work because it stops the user from removing sections as well. 
&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/38174.aspx</link><pubDate>Fri, 06 Feb 2009 18:43:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38174</guid><dc:creator>Thilakraj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38174.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=38174</wfw:commentRss><description>&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;Hello,&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;I&amp;#39;m using browser enabled form, so&amp;nbsp;I believe I can’t use the above script. Is there any other way to limit the repeating section in browser enabled forms?&lt;/font&gt; 
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Thanks,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Thilakraj&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/38136.aspx</link><pubDate>Fri, 06 Feb 2009 02:58:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38136</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38136.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=38136</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You have to add on before change event for that field then you have to check the number of nodes available in that list. If the count is exceeds your requirement then you to give one alert message and eventObj.ReturnStatus = false;&lt;/p&gt;
&lt;p&gt;Depends on your requirement you have to write the code and here is the sample,&lt;/p&gt;
&lt;p&gt;function msoxd_my_field2::OnBeforeChange(eventObj) &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;var repeatingNodes = XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:group1/my:group2&amp;quot;); &lt;/p&gt;
&lt;p&gt;if(repeatingNodes.length &amp;gt; 3) &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;XDocument.UI.Alert(&amp;quot;Exceed the nodes&amp;quot;); &lt;/p&gt;
&lt;p&gt;eventObj.ReturnStatus = false; &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Note: If you want to set the message &amp;#39;eventObj.ReturnMessage = &amp;quot;your message&amp;quot;.&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/38134.aspx</link><pubDate>Fri, 06 Feb 2009 00:31:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38134</guid><dc:creator>Thilakraj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38134.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=38134</wfw:commentRss><description>&lt;p&gt;Jimmy Rishe,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for the quick reply.. I tried your suggestion but when the user try to add the 4 th section, infopath is not showing user friendly error message.. it shows &amp;quot;&lt;strong&gt;Infopath cannot insert the section or row because of an error&amp;quot;.&lt;/strong&gt; Is there anyway to customise this error message and show user friendly message to the user?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Thilakraj&lt;/p&gt;</description></item><item><title>Re: How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/38133.aspx</link><pubDate>Fri, 06 Feb 2009 00:12:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38133</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38133.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=38133</wfw:commentRss><description>&lt;p&gt;I know of no way to accomplish this in the InfoPath designer, but for a fixed number (in your case 3) this is probably the easiest way to accomplish that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Save the template as its source files (from the File menu in the InfoPath designer)&lt;/div&gt;
&lt;li&gt;
&lt;div&gt;Open the schema (XSD)&amp;nbsp;file in a text editor&lt;/div&gt;
&lt;li&gt;
&lt;div&gt;Find the line that refers to your repeating field and change the maxOccurs value from &amp;quot;unbounded&amp;quot; to the number you want&lt;/div&gt;
&lt;li&gt;
&lt;div&gt;Save the schema&lt;/div&gt;
&lt;li&gt;
&lt;div&gt;Right-click manifest.xsf and select Design&lt;/div&gt;
&lt;li&gt;
&lt;div&gt;Re-save the template&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>How to Limit number of repeating section</title><link>https://www.infopathdev.com:443/forums/thread/38132.aspx</link><pubDate>Thu, 05 Feb 2009 23:45:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:38132</guid><dc:creator>Thilakraj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/38132.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=38132</wfw:commentRss><description>&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Hi,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;I need to restrict user to insert max of 3 repeating section in the infopath form. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;User should not be able to add more than 3 repeating section.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Can I do this through rule? &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;- Thilakraj&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>