<?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>SharePoint Integration</title><link>https://www.infopathdev.com:443/forums/46.aspx</link><description> For questions concerning issues in the integration of SharePoint and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: GetListItemsConfig data source not accessible</title><link>https://www.infopathdev.com:443/forums/thread/16347.aspx</link><pubDate>Thu, 03 Aug 2006 23:35:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16347</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16347.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16347</wfw:commentRss><description>Glad you got your issue figured out.&lt;br /&gt;Great tip. Thanks for sharing this with us!</description></item><item><title>Re: GetListItemsConfig data source not accessible</title><link>https://www.infopathdev.com:443/forums/thread/16346.aspx</link><pubDate>Thu, 03 Aug 2006 19:08:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:16346</guid><dc:creator>joshgerdes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/16346.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=16346</wfw:commentRss><description>Well I managed to figure out a solution myself so I thought I'd share it.  The problem with using a dropdown with the example had to do with what happened to the secondary datasources after the initial selection.  Basically nodes were being moved and not replaced.  So to fix the problem I modified the following:&lt;br /&gt;&lt;br /&gt;1.) Changed this line from:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;IXMLDOMNode fileQueryNode = thisXDocument.GetDOM("GetListItemsConfig").selectSingleNode("/GetListItemsConfig/QueryXmlString/Query ");&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;to:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;IXMLDOMDocument document = thisXDocument.CreateDOM();&lt;br /&gt;document.preserveWhiteSpace = true;&lt;br /&gt;document.loadXML(thisXDocument.GetDOM("GetListItemsConfig").selectSingleNode("/GetListItemsConfig/QueryXmlString/Query ").xml);&lt;br /&gt;IXMLDOMNode fileQueryNode = document.documentElement;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;2.) Changed this line from:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;oQuery.appendChild(fileQueryNode);&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;to:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;if( oQuery.firstChild != null )&lt;br /&gt;     oQuery.replaceChild(fileQueryNode,oQuery.firstChild);&lt;br /&gt;else&lt;br /&gt;     oQuery.appendChild(fileQueryNode);&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;This first part created a new instance of the node so it was not removed on the second selection of the dropdown.  The second part added a check to make sure you are not appending multiple query nodes when the second selection occurs.&lt;br /&gt;&lt;br /&gt;Thanks.</description></item><item><title>GetListItemsConfig data source not accessible</title><link>https://www.infopathdev.com:443/forums/thread/15443.aspx</link><pubDate>Wed, 02 Aug 2006 22:56:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15443</guid><dc:creator>joshgerdes</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15443.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15443</wfw:commentRss><description>Following the How-To "&lt;a href='http://www.infopathdev.com/howto/tutorials/default.aspx?i=5eb5c19c1e2747bc965fe1720534d8dd' target='_blank' title='http://www.infopathdev.com/howto/tutorials/default.aspx?i=5eb5c19c1e2747bc965fe1720534d8dd'&gt;Query for Items in SharePoint Form Library Using GetListItems Web Method&lt;/a&gt;" I am coming across a null reference exception when trying to access the GetListItemsConfig data source in the getListItems method of the example.  I have altered the example slightly  by having a dropdown box instead of a text box.  Basically it works fine with the initial selection from the dropdown but when I try to select a new item from the dropdown it somehow loses the data source reference in the XDocument.  The error occurs when trying to use GetDOM of thisXDocument which is a variable of XDocument set at _Startup.&lt;br /&gt;&lt;br /&gt;Any thoughts as to why I'm losing reference to the secondary data source on the second go around for the onafterchange event of the dropdown?</description></item></channel></rss>