<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53929.aspx</link><pubDate>Tue, 20 Apr 2010 22:44:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53929</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53929.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53929</wfw:commentRss><description>&lt;p&gt;In the conditional formatting for your button, set the first dropdown to &amp;quot;The Expression&amp;quot;. Type in &lt;strong&gt;position() != 1&lt;/strong&gt;. This will hide your button for all but the first group.&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53855.aspx</link><pubDate>Mon, 19 Apr 2010 15:59:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53855</guid><dc:creator>Bob Arctor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53855.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53855</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi again Hilary. I think we&amp;#39;re almost there. I understand the conditional formatting concept, but how do I set the &amp;quot;first instance of the group&amp;quot; condition/part?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53841.aspx</link><pubDate>Mon, 19 Apr 2010 10:31:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53841</guid><dc:creator>jayanaveen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53841.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53841</wfw:commentRss><description>&lt;p&gt;is there any way to hide menu bar in infopath 2003 form&amp;nbsp; and restrict user to see only their items using form template.&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53804.aspx</link><pubDate>Sat, 17 Apr 2010 11:54:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53804</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53804.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53804</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa679523(office.11).aspx"&gt;MSDN says&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&amp;nbsp;&amp;nbsp;In some cases, calling the &lt;b class="bterm"&gt;ExecuteAction&lt;/b&gt; method from the &lt;b class="bterm"&gt;&lt;a id="ctl00_MTCS_main_ctl11" href="http://msdn.microsoft.com/en-us/library/aa662345(office.11).aspx"&gt;&lt;font color="#0033cc"&gt;OnClick&lt;/font&gt;&lt;/a&gt;&lt;/b&gt; event for a button in a view may cause an error. This is because the selected context changes to the button when the button is clicked. In this case, it is better to use a button (or link) on a custom task pane, toolbar, or menu to call the &lt;b class="bterm"&gt;ExecuteAction&lt;/b&gt; method.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Which may be what you are running into. I found that if I put the button inside the repeating table / section I wanted to use the insert before action on, it worked. You could do that, then use conditional formatting to hide your button unless it was in the first instance of the group.&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53590.aspx</link><pubDate>Mon, 12 Apr 2010 16:12:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53590</guid><dc:creator>Bob Arctor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53590.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53590</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hilary, I&amp;#39;m back at work so I can provide more info about my form. As for the error message I spoke of earlier, it was &amp;quot;InfoPath cannot complete this action because of an error in the form&amp;#39;s code&amp;quot;. If I use xCollection::insert there is no problem. If I use xCollection::insertBefore (or other variations) I receive the error message.&lt;/p&gt;&lt;p&gt;As for my form, it has two sections- the top section is a repeating table and the second section is a repeating section with a repeating table inside of it. The top section contains employee data- name, unit, supervisor. The 2nd section contains a date field and task/time spent fields. The task field is a drop down box where the employee selects whatever task they worked on. The time spent field is where they record the time spent on any particular task. When the employee opens the form, they put their name in a name query field, then click a query button, which then populates the top section and the 2nd section. So, after running the query, the top section will contain their name, unit and supervisor. The second section shows the dates they worked and the tasks/time spent on each task. The second section is filtered to only show the 6 most recent weeks worked, so the typical user sees about 30 repeating sections worth of dates worked and the tasks/time spent for those days.&lt;/p&gt;&lt;p&gt;&amp;nbsp;As it stands, when the user clicks the add section button I&amp;#39;m attempting to add to the form, it puts the new section at the bottom of the form (after the last repeating section), which requires the user to scroll all the way to the bottom of the form to fill it out. What I&amp;#39;m trying to accomplish is to have the new section be inserted immediately below the top section and above the most recently dated 2nd section, basically in between the two. Does that make sense? Let me know if you need further info and thanks again for your help!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53550.aspx</link><pubDate>Sat, 10 Apr 2010 00:06:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53550</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53550.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53550</wfw:commentRss><description>&lt;p&gt;Hi -- &lt;/p&gt;
&lt;p&gt;You can place the control you want on your form in the design view. Then, in Tools / Defaults, you can choose not to have the repeating group bound to that control included when the form is opened. Then your button can use xCollection::insert to insert the repeating section, and the control will show. Is that what you were asking? I may be a little confused. :-)&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53547.aspx</link><pubDate>Fri, 09 Apr 2010 19:37:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53547</guid><dc:creator>Bob Arctor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53547.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53547</wfw:commentRss><description>&lt;p&gt;Hi Hilary. I&amp;#39;m off work today so I don&amp;#39;t have access to my form to tell you what the error message is. While I have your ear, let me ask you another question, the answer to which may clear up my problem with the error message. Thanks to &amp;quot;xCollection::insert&amp;quot; I can insert the repeating section like I wanted. Let&amp;#39;s say I wanted to insert it immediately after a particular repeating table on my form. Is that possible? If so, what would the vbscript syntax be for that? Basically, I&amp;#39;m looking for the repeating section to be inserted in a particular spot on my form (the user will do this via a button on the form). I&amp;#39;ve got the button on the form and the insert code behind it (which works), I just don&amp;#39;t know&amp;nbsp; how&amp;nbsp; to control the placement of the repeating section on&amp;nbsp;the form.&lt;/p&gt;
&lt;p&gt;Thanks for all your help- I appreciate it!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53506.aspx</link><pubDate>Fri, 09 Apr 2010 00:36:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53506</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53506.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53506</wfw:commentRss><description>&lt;p&gt;What is the error?&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53489.aspx</link><pubDate>Thu, 08 Apr 2010 14:47:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53489</guid><dc:creator>Bob Arctor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53489.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53489</wfw:commentRss><description>&lt;p&gt;In theory, found what I was looking for with &amp;quot;xCollection::insertBefore&amp;quot;, but of course that was too easy, so I receive an error message when using that.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53487.aspx</link><pubDate>Thu, 08 Apr 2010 14:14:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53487</guid><dc:creator>Bob Arctor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53487.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53487</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thank you. That&amp;#39;s what I was looking for. Now I just need to figure our how to make the repeating section appear at the top of the form instead of the bottom...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53447.aspx</link><pubDate>Wed, 07 Apr 2010 22:17:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53447</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53447.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53447</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="http://www.infopathdev.com/blogs/jimmy/archive/2009/03/06/automatically-adding-rows-to-repeating-sections.aspx"&gt;this&lt;/a&gt; blog post by Jimmy, or &lt;a href="http://www.qdabra.com/en/products/qRules.aspx"&gt;qRules&lt;/a&gt; can make this easy for you to do without code!&lt;/p&gt;</description></item><item><title>Add repeating section via vb script</title><link>https://www.infopathdev.com:443/forums/thread/53298.aspx</link><pubDate>Thu, 01 Apr 2010 16:54:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53298</guid><dc:creator>Bob Arctor</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53298.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=53298</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello! I&amp;#39;m looking to add a button to my form with code behind the button that will add a repeating section. Basically, vb script that is equivalent to &amp;quot;Insert myrepeating section above&amp;quot;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Thanks in advance. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>