<?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: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11084.aspx</link><pubDate>Wed, 14 Feb 2007 20:43:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11084</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11084.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11084</wfw:commentRss><description>Hi.. again, I'm glad you got it working, and not having it as optional is a satisfactory solution, then there's no sense going back to it at this point.&lt;br /&gt;&lt;br /&gt;I'm not exactly sure why it wasn't working for you--I just know that I do this kind of stuff all the time and have never had such issues. All I can think is that there was some other issue involved which would need to be debugged to find out why it wasn't working.&lt;br /&gt;&lt;br /&gt;Thanks for sharing your solution, it might prove useful to another in a similar situation!!</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11083.aspx</link><pubDate>Wed, 14 Feb 2007 19:15:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11083</guid><dc:creator>erinselena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11083.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11083</wfw:commentRss><description>I thought Greg was saying that you can programmatically add a node to an optional section as long as it exists in the DOM. What i was saying is that my optional section DID exist in the DOM however I could not programmatically add nodes to the xml. It wasn't until (upon Microsofts advice) I changed my optional section to a regular section, that i could programmatically add nodes to the DOM.&lt;br /&gt;Anyways it works now, so i am happy.</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11082.aspx</link><pubDate>Wed, 14 Feb 2007 18:56:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11082</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11082.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11082</wfw:commentRss><description>Hi ErinSelena,&lt;br /&gt;So isn't that what Greg is saying? I think you got the easy advice from MS. This is doable, but perhaps not worth the trouble since you have a workaround... :)</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11081.aspx</link><pubDate>Wed, 14 Feb 2007 14:12:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11081</guid><dc:creator>erinselena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11081.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11081</wfw:commentRss><description>The weird thing about that though Greg is that the optional section DID exist in the DOM and it was a part of my form??!!</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11080.aspx</link><pubDate>Wed, 14 Feb 2007 01:01:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11080</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11080.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11080</wfw:commentRss><description>I'm glad you got it working, however I would like to make a corrective statement:&lt;br /&gt;&lt;br /&gt;You can programmatically add them to an optional section -- provided the optional section exists in the DOM (i.e. it's optionally THERE as opposed to optionally NOT THERE).&lt;br /&gt;&lt;br /&gt;However, as stated ealier, do not try to use 'ExecuteAction'. Instead build the nodes in code, and then append them or insert them as appropriate.</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11079.aspx</link><pubDate>Mon, 12 Feb 2007 21:37:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11079</guid><dc:creator>erinselena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11079.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11079</wfw:commentRss><description>Hi Everyone,&lt;br /&gt;I ended up having to call Microsoft on this one. The repeating table I had was inside an optional section on my form. It turns out you cannot add nodes programmatically to optional sections, i turned my option section into a regular section and all works as it should.&lt;br /&gt;Erin</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11078.aspx</link><pubDate>Sat, 10 Feb 2007 00:36:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11078</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11078.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11078</wfw:commentRss><description>After creating the XmlNode (oElement1), you should be able to directly append it to your DOM... not sure why your returning the OuterXml, etc.&lt;br /&gt;&lt;br /&gt;Also, you need to make sure that your element is created using the same namespaces as your DOM you want to insert it into. It looks like you are probably doing that, but you need to make sure because you are creating a new XmlDocument, rather than creating the node using the MainDataSource DOM.&lt;br /&gt;&lt;br /&gt;Sorry if confusing... I've had little experience so far using the 07 OM... I'm still spending most all my time building 03 forms for work.</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11077.aspx</link><pubDate>Fri, 09 Feb 2007 20:17:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11077</guid><dc:creator>erinselena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11077.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11077</wfw:commentRss><description>Hi Greg,&lt;br /&gt;I've tried to append nodes to the DOM as you suggest however i continue to get this error: &lt;br /&gt;&lt;br /&gt;"Schema validation found non-data type errors"&lt;br /&gt;&lt;br /&gt;When i do.. here is the code i use:&lt;br /&gt;&lt;br /&gt;string temp = createChildNode(pair);&lt;br /&gt;XmlReader reader = XmlReader.Create(new StringReader(temp));&lt;br /&gt;                    formControl1.XmlForm.MainDataSource.CreateNavigator().SelectSingleNode(Constants.IMAGESGROUP, xmlnsm).AppendChild(reader);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private string createChildNode(KeyValuePair&amp;lt;Guid, string&amp;gt; pair)&lt;br /&gt;        {&lt;br /&gt;            //write get the XML of repeating node into a string &lt;br /&gt;            XmlDocument document = new XmlDocument();&lt;br /&gt;&lt;br /&gt;            XmlNode oElement1 = document.CreateElement("my:Image", xmlnsm.ToString());&lt;br /&gt;            XmlAttribute typeAttribute = document.CreateAttribute("my:Type", xmlnsm.ToString());&lt;br /&gt;            typeAttribute.InnerText = pair.Value;&lt;br /&gt;&lt;br /&gt;            XmlAttribute idAttribute = document.CreateAttribute("my:Id", xmlnsm.ToString());&lt;br /&gt;            idAttribute.InnerText = pair.Key.ToString();&lt;br /&gt;&lt;br /&gt;            oElement1.Attributes.Append(typeAttribute);&lt;br /&gt;            oElement1.Attributes.Append(idAttribute);&lt;br /&gt;&lt;br /&gt;            document.AppendChild(oElement1);&lt;br /&gt;         &lt;br /&gt;            return document.DocumentElement.OuterXml;&lt;br /&gt;        }</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11076.aspx</link><pubDate>Fri, 09 Feb 2007 20:14:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11076</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11076.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11076</wfw:commentRss><description>ExecuteAction is flaky at best. I say this because there are too many restrictions on when and where it can be used.&lt;br /&gt;&lt;br /&gt;I you want to insert nodes into your DOM from code, just do it directly by creating the nodes in code, and then appending, or inserting them where they should go.&lt;br /&gt;&lt;br /&gt;If you need help creating and adding nodes to a DOM, Visual Studio help should be able to get you what you need.</description></item><item><title>Re: executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/11075.aspx</link><pubDate>Fri, 09 Feb 2007 20:03:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11075</guid><dc:creator>erinselena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11075.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=11075</wfw:commentRss><description>Now I am getting this error&lt;br /&gt;&lt;br /&gt;The specified bstrAction value for the View.ExecuteAction call is not applicable for the current selection&lt;br /&gt;&lt;br /&gt;when i use executeAction.. here is the code:&lt;br /&gt;&lt;br /&gt;formControl1.XmlForm.CurrentView.ExecuteAction(Microsoft.Office.InfoPath.ActionType.XOptionalInsert, Constants.IMAGES_XMLTOEDIT);&lt;br /&gt;&lt;br /&gt;where Images_XmlToEdit = Images_128</description></item><item><title>executeAction not working.. WHY WHY WHY?</title><link>https://www.infopathdev.com:443/forums/thread/6054.aspx</link><pubDate>Fri, 09 Feb 2007 19:34:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6054</guid><dc:creator>erinselena</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6054.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6054</wfw:commentRss><description>Hello All,&lt;br /&gt;New to infopath and using infopath 2007. I am extremely frustrated right now to lack of support online for this product but can see that it's valuable once I can get past these growing pains. I hope someone can help, i've been looking at this same problem for DAYS and can't get it to work.&lt;br /&gt;So i have an infopath form, there is a repeating group with 1 field with 2 attributes on it. In essence it looks like&lt;br /&gt;&amp;lt;my:Images&amp;gt;&lt;br /&gt;  &amp;lt;my:Image my:Type='type' my:Id='id'&amp;gt;&amp;lt;/my:Image&amp;gt;&lt;br /&gt;&amp;lt;/my:Images&amp;gt;&lt;br /&gt;&lt;br /&gt;My form is hosted in a windows forms application using C#. What i want to do is dynamically through code add the Image children to the Images parent in the underlying XML. This seems to be IMPOSSIBLE and I am wondering if anyone knows how to do this?&lt;br /&gt;&lt;br /&gt;i have tried appending a new XML node to the parent node using appendChild.. this way gives me a "Schema validation found non-data type errors" error and i have no idea what this means and what i can do to prevent it and make it work.&lt;br /&gt;&lt;br /&gt;i have tried using the currentView.ExecuteAction method and with that i get the error "The specified varXmlToEdit value for the View.ExecuteAction call is not valid" OR I GET THE ERROR "Either the combination of values for the&lt;br /&gt;View.SelectNodes call is an invalid selection, or the values are not defined for..." i get this error if i try and select the node i want to append to prior to using executeAction.&lt;br /&gt;&lt;br /&gt;Does anyone know anything that may help me????&lt;br /&gt;Thanks&lt;br /&gt;this view, defined for this view more than once, or not selectable in the view."</description></item></channel></rss>