<?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: Inserting Optional Section</title><link>https://www.infopathdev.com:443/forums/thread/31653.aspx</link><pubDate>Fri, 22 Aug 2008 23:28:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31653</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31653.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31653</wfw:commentRss><description>&lt;p&gt;Hi, Michael:&lt;/p&gt;
&lt;p&gt;Is this happening when you insert these items using code while the form is being filled out? Or when you are in design mode? If in design mode, check to see the height of your optional section is not set to a fixed number -- set it to auto. Also, you can try making sure you&amp;#39;ve deleted any blank lines (except the one your cursor is on) prior to inserting a table.&lt;/p&gt;</description></item><item><title>Re: Inserting Optional Section</title><link>https://www.infopathdev.com:443/forums/thread/31615.aspx</link><pubDate>Thu, 21 Aug 2008 04:32:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31615</guid><dc:creator>Michael Campbell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31615.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=31615</wfw:commentRss><description>&lt;p&gt;Matt&lt;/p&gt;
&lt;p&gt;When I insert an optional section and then insert a table within the Optional Section, I somehow end up with an extra blank line under the option section. I can&amp;#39;t delete this blank line or changing the formatting does not seem to help.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Any ideas&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Michael&lt;/p&gt;</description></item><item><title>Re: Inserting Optional Section</title><link>https://www.infopathdev.com:443/forums/thread/25878.aspx</link><pubDate>Thu, 24 Jan 2008 03:13:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25878</guid><dc:creator>djay</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25878.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25878</wfw:commentRss><description>&lt;p&gt;ExecuteAction doesn&amp;#39;t work very well.&amp;nbsp; It has a lot of bugs.&lt;/p&gt;
&lt;p&gt;I find it easier to just add the xml directly to the data source.&lt;/p&gt;
&lt;p&gt;Setup a DOM with the data from sampledata.xml to use as your pure source of xml like this: (you will need to modify the namespace line for your form)&lt;/p&gt;
&lt;p&gt;(in C#)&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;SampleDOM = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;/p&gt;SampleDOM.async = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;SampleDOM.validateOnParse = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;SampleDOM.load(&amp;quot;sampledata.xml&amp;quot;);&lt;/p&gt;
&lt;p&gt;SampleDOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;,&amp;quot;xmlns:my=\&lt;a href="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-27T21-01-33/&amp;quot;"&gt;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-27T21-01-33\&amp;quot;&lt;/a&gt;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then append the xml your optional section is linked to (I strongly suggest putting your optional section group in a wrapper group with the optional section as the only child):&lt;/p&gt;
&lt;p&gt;IXMLDOMNode parent = thisXDocument.DOM.selectSingleNode(&amp;quot;my:root/my:WrapperGroup&amp;quot;);&lt;/p&gt;
&lt;p&gt;IXMLDOMNode OptSection = SampleDOM.selectSingleNode(&amp;quot;my:root/my:WrapperGroup/my:OptSec&amp;quot;).cloneNode(true);&lt;/p&gt;
&lt;p&gt;parent.appendChild(OptSection);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The section attached to the group my:OptSec should then appear in the view.&amp;nbsp; This works for repeating tables, etc.&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Inserting Optional Section</title><link>https://www.infopathdev.com:443/forums/thread/25378.aspx</link><pubDate>Thu, 03 Jan 2008 16:25:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25378</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25378</wfw:commentRss><description>&lt;p&gt;Try these links:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb250906.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb250906.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb229764.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb229764.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;XDocument.View.ExecuteAction( )&lt;/p&gt;</description></item><item><title>Inserting Optional Section</title><link>https://www.infopathdev.com:443/forums/thread/25241.aspx</link><pubDate>Thu, 20 Dec 2007 16:41:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25241</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25241.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25241</wfw:commentRss><description>&lt;p&gt;I am trying to have a button that inserts an optional section.&amp;nbsp; I found code online to do this in either VB or C#.&lt;/p&gt;&lt;p&gt;&lt;span&gt;
&lt;p align="left"&gt;this.CurrentView.ExecuteAction(. &lt;b&gt;ActionType&lt;/b&gt;.&lt;b&gt;XOptionalInsert&lt;/b&gt;, &amp;quot;OptionalSection&amp;quot;)&lt;/p&gt;&lt;p align="left"&gt;I am wondering if any one knows the equivalent of this in JScript?&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>