<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/36353.aspx</link><pubDate>Tue, 30 Dec 2008 07:34:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36353</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36353.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36353</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; 2) &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;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/36268.aspx</link><pubDate>Wed, 24 Dec 2008 23:34:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36268</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36268.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36268</wfw:commentRss><description>&lt;p&gt;ok, your remaining problem is how to let users delete a row seeing as you have disabled the built in delete options.&lt;/p&gt;
&lt;p&gt;Add another column to your repeating table (this sometimes creates a new field in your datasource,so don&amp;#39;t forget to delete it) and put a button in the column (I usually put a lowercase x on it to indicate &amp;#39;delete&amp;#39;)&lt;/p&gt;
&lt;p&gt;Now right click the button and go to &amp;#39;Edit code behind button&amp;#39;.&lt;/p&gt;
&lt;p&gt;Now paste the following standard code to delete a repeating section/table row from a button like this:&lt;/p&gt;
&lt;p&gt;//[Jscript]&lt;/p&gt;
&lt;p&gt;var thisNode = eventObj.Source.selectSingleNode(&amp;quot;.&amp;quot;);&lt;br /&gt;thisNode.parentNode.removeChild(thisNode)&lt;/p&gt;
&lt;p&gt;You can use this code without modification in any button in a repeating section or table and it will delete the repeating section or table that the button resides in!&lt;/p&gt;
&lt;p&gt;Good luck, merry christmas!&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/36065.aspx</link><pubDate>Thu, 18 Dec 2008 19:47:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36065</guid><dc:creator>VadimS81</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36065.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=36065</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks for the help, unfotunatly it won&amp;#39;t work for me because I need the limit to be based on condition.&amp;nbsp; Depending on what is selected the limit needs to change.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thank you &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35990.aspx</link><pubDate>Thu, 18 Dec 2008 00:31:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35990</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35990.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35990</wfw:commentRss><description>&lt;p&gt;The easiest way to do this is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Save the template as its source files&lt;/div&gt;&lt;/li&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;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;li&gt;
&lt;div&gt;Save the schema&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Right-click manifest.xsf and select Design&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Re-save the template&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35989.aspx</link><pubDate>Wed, 17 Dec 2008 23:50:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35989</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35989.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35989</wfw:commentRss><description>&lt;p&gt;Interesting dilemma, since InfoPath&amp;#39;s built in Conditional Formatting options group together insert/delete (i.e. &amp;quot;Don&amp;#39;t allow users to insert or delete this control&amp;quot;).&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35987.aspx</link><pubDate>Wed, 17 Dec 2008 23:10:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35987</guid><dc:creator>VadimS81</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35987.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35987</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks, the only problem is that I want users to be able to remove the rows.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35982.aspx</link><pubDate>Wed, 17 Dec 2008 22:16:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35982</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35982.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35982</wfw:commentRss><description>&lt;p&gt;Ernesto, that works very well and limits it to 3 as an example.&amp;nbsp; Nice work and very simple.&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35979.aspx</link><pubDate>Wed, 17 Dec 2008 22:08:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35979</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35979.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35979</wfw:commentRss><description>&lt;p&gt;Attaching 2007 version too.&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35978.aspx</link><pubDate>Wed, 17 Dec 2008 22:08:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35978</guid><dc:creator>ErnestoM</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35978.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35978</wfw:commentRss><description>&lt;p&gt;Hello, attached you&amp;#39;ll find a form that I think accomplishes what you&amp;#39;re trying to do.&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35970.aspx</link><pubDate>Wed, 17 Dec 2008 21:31:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35970</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35970.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35970</wfw:commentRss><description>&lt;p&gt;Well, I know that you can count and total fields in a repeating table, so I think we still need to focus on that.&amp;nbsp; As for your overall goal, I have never tried to do such a thing, so I am just trying to help you troubleshoot the individual issue that seems to be keeping you from your goal.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll need more details and the exact method by which you are trying to count fields in your repeating table.&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35968.aspx</link><pubDate>Wed, 17 Dec 2008 21:24:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35968</guid><dc:creator>VadimS81</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35968.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35968</wfw:commentRss><description>&lt;p&gt;&lt;/p&gt;&lt;p&gt;Tried that, does not seem to work either.&amp;nbsp; is there maybe some other way to limit number of repeating rows based on condition.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35967.aspx</link><pubDate>Wed, 17 Dec 2008 21:19:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35967</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35967.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35967</wfw:commentRss><description>&lt;p&gt;I don&amp;#39;t think you can count the section itself.&amp;nbsp; You need to count one of the nodes (fields)&amp;nbsp;inside the repeating table, and they probably have to be populated, since a null value may not add to the count.&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35966.aspx</link><pubDate>Wed, 17 Dec 2008 21:18:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35966</guid><dc:creator>VadimS81</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35966.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35966</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I am just trying to add a rule like this count(.) &amp;gt; 2.&amp;nbsp; dot is a repeating section that I am trying to count.&lt;/p&gt;&lt;p&gt;Thank you &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35959.aspx</link><pubDate>Wed, 17 Dec 2008 21:01:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35959</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35959.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35959</wfw:commentRss><description>&lt;p&gt;What are you setting the count function to?&amp;nbsp; Which field?&amp;nbsp; Are you populating the fields that are being counted?&lt;/p&gt;</description></item><item><title>limiting the number of repeating sections based on condition</title><link>https://www.infopathdev.com:443/forums/thread/35955.aspx</link><pubDate>Wed, 17 Dec 2008 20:51:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:35955</guid><dc:creator>VadimS81</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/35955.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=35955</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I am trying to limit the number of rows allowed based on a condition.&amp;nbsp; I have tried to do it with the rules, however when I do count(), I always seem to get 1 as a result no matter how many rows I have.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks a lot,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thank you &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>