<?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: Query Form Library</title><link>https://www.infopathdev.com:443/forums/thread/56142.aspx</link><pubDate>Wed, 23 Jun 2010 11:11:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:56142</guid><dc:creator>aikin_dm</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/56142.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=56142</wfw:commentRss><description>&lt;p&gt;Can you query a form library in Infopath 2003 without using any code.&lt;/p&gt;</description></item><item><title>Re: Query Form Library</title><link>https://www.infopathdev.com:443/forums/thread/15651.aspx</link><pubDate>Thu, 21 Jul 2005 01:10:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15651</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15651.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15651</wfw:commentRss><description>Sure. I posted some sample code on Microsoft's public form the other day:&lt;br /&gt;&lt;br /&gt;public void SharePointListAdapterDropDown_OnAfterChange(DataDOMEvent e)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;// filter out noise&lt;br /&gt;if (e.IsUndoRedo || "Insert" != e.Operation || "" == e.NewValue)&lt;br /&gt; return;&lt;br /&gt;&lt;br /&gt;// prevent infinite loops when loading files from ShP&lt;br /&gt;if(true == fGettingSharePointFile)&lt;br /&gt;{&lt;br /&gt; fGettingSharePointFile = false;&lt;br /&gt; return;&lt;br /&gt;}&lt;br /&gt;fGettingSharePointFile = true;&lt;br /&gt;&lt;br /&gt;// get the selection&lt;br /&gt;string sKey = e.Site.text;&lt;br /&gt;&lt;br /&gt;// "test" is the name of your sharePoint list adapter data connection&lt;br /&gt;SharepointListAdapter oSpla =&lt;br /&gt;(SharepointListAdapter)thisXDocument.DataAdapters["test"];&lt;br /&gt;sUrl = oSpla.SiteUrl;&lt;br /&gt;&lt;br /&gt;// "test" is also the name of a secondary data source that you will&lt;br /&gt;pre-populate&lt;br /&gt;IXMLDOMDocument2 oDom = (IXMLDOMDocument2)thisXDocument.GetDOM("test");&lt;br /&gt;oDom.setProperty("SelectionNamespaces",&lt;br /&gt;"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolut&lt;br /&gt;ion\"");&lt;br /&gt;// filter on the value using sKey&lt;br /&gt;string sName =&lt;br /&gt;oDom.selectSingleNode(string.Format("//dfs:test[@key1=\"{0}\"]/@Value",&lt;br /&gt;sKey)).text;&lt;br /&gt;&lt;br /&gt;// Note: you need to set sSP_FOLDER to your SharePoint folder&lt;br /&gt;// - you can do this programmatically using SolutionURL and walking up the&lt;br /&gt;string sFilename = sUrl + sSP_FOLDER + sName;&lt;br /&gt;&lt;br /&gt;// random schema - please change to suit your insertion needs&lt;br /&gt;IXMLDOMNode oParentNode = getNode("//my:root/my:section1");&lt;br /&gt;IXMLDOMNode oNode = getNode("//my:root/my:section1/rd:section2");&lt;br /&gt;&lt;br /&gt;// Load the XML DOM from the file&lt;br /&gt;IXMLDOMDocument2 oXml = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;oXml.async = false;&lt;br /&gt;oXml.load(sFilename);&lt;br /&gt;oXml.setProperty("SelectionNamespaces",&lt;br /&gt;"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"&lt;br /&gt;xmlns:rd=\"http://www.infopathdev.com/Samples/ShP/GetFile\"&lt;br /&gt;xmlns:xhtml=\"http://www.w3.org/1999/xhtml\"&lt;br /&gt;xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-07-1&lt;br /&gt;7T17:30:19\"&lt;br /&gt;xmlns:xd=\"http://schemas.microsoft.com/office/infopath/2003\"");&lt;br /&gt;&lt;br /&gt;// Note: be careful calling replaceChild since it can be slow&lt;br /&gt;IXMLDOMNode oNewNode = oXml.selectSingleNode("//my:root/my:section1//" +&lt;br /&gt;oExistingNode.nodeName);&lt;br /&gt;oParentNode.replaceChild(oNewNode.cloneNode(true), oExistingNode);&lt;br /&gt;&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Patrick Halstead [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Query Form Library</title><link>https://www.infopathdev.com:443/forums/thread/15259.aspx</link><pubDate>Wed, 20 Jul 2005 23:10:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15259</guid><dc:creator>rilliam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15259.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=46&amp;PostID=15259</wfw:commentRss><description>I know that it is possible to populate other fields based on the input of a certain field that uses a rule to query a sharepoint "list".&lt;br /&gt;&lt;br /&gt;I need to do the same but use a form library. Is this possible?&lt;br /&gt;&lt;br /&gt;The only results I have been getting is that the query returns the first entry in the library.</description></item></channel></rss>